Giter Club home page Giter Club logo

div-ccd-definitions's Introduction

div-ccd-definitions

Divorce configuration definitions for CCD.

Setup

Pre-requirements

Install nvm to manage node from https://github.com/nvm-sh/nvm

Install required node version using nvm install

Install

Run yarn install && yarn setup to install the dependencies for both this project and the submodule

Feature toggle

If you want to test something on local, aat or demo env, but don't want to release it on prod make sure you move all definitions you don't want to release to a file with suffix "-nonprod.json".

To do it, you need to create a folder for files related to that xlsx tab, eg: "AuthorisationCaseEvent" where you move the production file "AuthorisationCaseEvent.json" and you create another one with definitions you don't want to release yet (eg. AuthorisationCaseEvent-noprod.json, but can be any name such as "definitions-for-bsp-ABC-nonprod.json").

When "toggled off" definitions can be released, just move them to the prod file and remove them from nonprod file. Then follow the typical release process.

Please read more here: https://tools.hmcts.net/confluence/display/BSP/Feature+toggle+for+CCD+definition

Convert JSON to Excel

For all environments

yarn generate-excel-all to generate excel configs for all environments (Demo, AAT and Prod)

The generated excel files will be in defintions/divorce/xlsx

For a specific environment

yarn generate-excel-(local\demo\aat\prod)

For example

yarn generate-excel-aat

For a bulk-action config

yarn generate-bulk-excel-(local\demo\aat\prod)

For example

yarn generate-bulk-excel-aat

For all environments bulk-action's config

yarn generate-bulk-excel-all

Convert Excel to JSON

If you prefer to make the changes directly on the excel file, and then convert back to JSON:

  1. Generate a fresh base Excel file using the yarn generate-excel. The generated excel file will be in defintions/divorce/xlsx/ccd-config-base.xlsx and will contain placeholder URLs.
  2. Make the changes to ccd-config-base.xlsx but ensure you don't have any environment-specific URLs (use placeholders instead).
  3. Once you're satisfied with your changes in the Excel file, convert back to JSON using yarn generate-json
  4. Review the JSON file changes to ensure all your changes are correct

Accessing CCD on preview/per PR

A full CCD instance is created PR via Helm charts which can be accessed using the details below.

If you do not require this, add [NO-CCD] at the start of the PR title in GitHub.

  • Visit https://gateway-div-ccd-definitions-pr-<number>.preview.platform.hmcts.net and whitelist accept the SSL certificate
  • Access the PR on https://case-management-web-div-ccd-definitions-pr-<number>.preview.platform.hmcts.net
  • Login with an authorised AAT user listed here

Accessing documents on a CCD PR

To access generated documents on a CCD PR, you have to use the AAT env gateway:

  • Ensure you're logged in with a user that can access the documents (e.g caseworker or solicitor depending on the case) on https://www-ccd.aat.platform.hmcts.net/
  • Copy the document URL from the Documents tab in CCD, and replace the hostname with https://gateway-ccd.aat.platform.hmcts.net

Creating cases

To be able to create a case as a solicitor in a CCD PR, you have to create:

This will ensure that callbacks point back to the correct CCD URL.

Applications useful urls

  • CCD admin https://admin-web-div-ccd-definitions-pr-<number>.preview.platform.hmcts.net Importer username/password can be found here
  • CCD data-store-api http://data-store-api-div-ccd-definitions-pr-<number>.preview.platform.hmcts.net

To run divorce test on CCD PR environment you need to replace core_case_data.api.url on COS and CMS to use your PR data-store-api URL

ccd-definition-processor

This repo makes use of https://github.com/hmcts/ccd-definition-processor to generate the excel file. You may have to update this repo if, for example, you need to add a column to the definitions spreadsheet.

Ideally this should be a published NPM package, so that we can include it in package.json but at the moment we include it as a git submodule

A submodule is simply a pointer to a repo and a commit. If you want to reset that repo to the latest upstream master, run

yarn reset-ccd-submodule

You need to use this if you have accidentally change this pointer reference to something other than what you intended (you can instead modify the above command to package.json to check out a specific commit/version of that submodule)

It's also important to note that once you update to a new reference (i.e you commit a change to the ccd-definition-processor file) you need to make sure everyone else runs yarn setup again to get the updated reference as well.

Release

When we want to release config changes to production:

  1. Generate all excel files using yarn generate-excel-all
  2. Upload the excel file for the AAT env and QA the changes
  3. Create a new release in https://github.com/hmcts/div-ccd-definitions/releases/new
  4. Upload all the generate Excel files to the release and add give it the same version number from (3)
  5. Raise a RDM ticket (e.g. RDM-5372) and add link to the release created in step (7)
  6. Ask tester to sign off the RDM if changes pass and assign the RDM ticket to someone in the RDM team

Run full E2E Tests for both Journeys:

Run full E2E tests on CCD PR or AAT

  1. Configure defined env variables , env variables can be found in Azure divorce aat key vault.
  2. yarn test:functional will create cases via API (runs on PR and master AAT)

div-ccd-definitions's People

Contributors

adamjhc avatar alexwakeman avatar anatolysan avatar cotterale avatar davejones74 avatar dawudgovuk avatar dependabot[bot] avatar gavinclark avatar gurarach avatar harryh96 avatar hosainnet avatar iichr avatar jacmurphy avatar jakub-kozlowski avatar madjava avatar michael1142 avatar mounikahmcts avatar ms-ek avatar qzhou-hmcts avatar ravinderpal avatar rishikrsharma avatar ruban72 avatar scotty2791 avatar shaunganley avatar suresh-sharada avatar tchow8 avatar timja avatar tseelig avatar tzarsmango avatar vianvi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

div-ccd-definitions's Issues

Create JSON lint rules

What would you like to change?

How do you think that would improve the project?

If this entry is related to a bug, please provide the steps to reproduce it

Create unit/validation tests

What would you like to change?

How do you think that would improve the project?

If this entry is related to a bug, please provide the steps to reproduce it

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency @hmcts/nodejs-healthcheck to v1.8.5
  • Update dependency async to v3.2.5
  • Update dependency config to v3.3.11
  • Update Helm release nodejs to v2.5.0
  • Update Yarn to v3.8.1
  • Update dependency chai to v4.4.1
  • Update dependency moment to v2.30.1
  • Update dependency qs to v6.12.1
  • Update Helm release ccd to v9
  • Update Helm release nodejs to v3
  • Update Node.js to v20
  • Update Yarn to v4
  • Update dependency @hmcts/properties-volume to v1
  • Update dependency ansi-regex to v6
  • Update dependency bl to v6
  • Update dependency chai to v5
  • Update dependency codeceptjs to v3
  • Update dependency debug to v4
  • Update dependency eslint to v9
  • Update dependency eslint-plugin-mocha to v10
  • Update dependency eslint-utils to v3
  • Update dependency flat to v6
  • Update dependency glob-parent to v6
  • Update dependency https-proxy-agent to v7
  • Update dependency husky to v9
  • Update dependency ini to v4
  • Update dependency minimatch to v9
  • Update dependency mocha to v10
  • Update dependency otp to v1
  • Update dependency prettier to v3
  • Update dependency pretty-quick to v4
  • Update dependency puppeteer to v22
  • Update dependency ws to v8
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/node 14-alpine
helmv3
charts/div-ccd-definitions/Chart.yaml
  • nodejs 2.4.18
  • ccd 8.0.29
  • xui-webapp ~1.0.0
  • xui-mo-webapp ~1.1.6
  • aac-manage-case-assignment ~0.2.5
  • idam-pr 2.2.7
  • div-pfe 2.0.27
  • div-rfe 2.0.22
  • div-da 2.0.23
  • div-dn 2.0.19
  • div-cos 1.5.13
  • div-cms 2.0.11
  • div-dgs 2.0.10
  • div-emca 2.0.10
  • div-fps 3.0.10
npm
package.json
  • @hmcts/nodejs-healthcheck ^1.8.0
  • @hmcts/properties-volume 0.0.13
  • codeceptjs ^2.6.11
  • config ^3.3.3
  • eslint-plugin-codeceptjs ^1.3.0
  • express ^4.17.3
  • puppeteer ^13.1.2
  • @hmcts/eslint-config ^1.4.0
  • chai ^4.2.0
  • eslint ^5.16.0
  • eslint-plugin-mocha ^5.3.0
  • husky ^2.2.0
  • lodash ^4.17.21
  • mocha ^6.1.4
  • otp ^0.1.3
  • pre-commit ^1.2.2
  • prettier ^1.17.0
  • pretty-quick ^1.10.0
  • request ^2.88.2
  • request-promise-native ^1.0.9
  • sonar-scanner ^3.1.0
  • node >=14.18.1
  • https-proxy-agent 2.2.3
  • eslint-utils ^1.4.1
  • minimist ^1.2.6
  • bl 1.2.3
  • ini 1.3.6
  • axios ^0.21.1
  • ws ^7.4.6
  • glob-parent ^5.1.2
  • path-parse ^1.0.7
  • ansi-regex ^5.0.1
  • json-schema ^0.4.0
  • follow-redirects ^1.14.7
  • mocha ^6.1.4
  • nanoid >=3.1.31
  • moment >=2.29.2
  • async >=2.6.4
  • minimatch ^3.0.5
  • qs ^6.7.3
  • flat ^5.0.1
  • json5 ^2.2.3
  • debug ^3.1.0
  • cookiejar ^2.1.4
  • yarn 3.6.0

  • Check this box to trigger a request for Renovate to run again on this repository

Cloumns with 0 value are ignored when converting to Excel

What would you like to change?

@alexwakeman noticed that we don't retain a cell value if it is 0 e.g https://github.com/hmcts/div-ccd-definitions/blob/master/definitions/divorce/json/FixedLists.json#L593

Which means when we go JSON -> Excel, that cell is empty and the upload to CCD fails

How do you think that would improve the project?

Retain the 0 value

If this entry is related to a bug, please provide the steps to reproduce it

Convert back and fourth between JSON <-> Excel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.