diff --git a/.circleci/config.yml b/.circleci/config.yml index f43db31dea7..a8690c2f9c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2 jobs: bundle: + resource_class: large docker: - image: $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:latest aws_auth: @@ -71,7 +72,7 @@ jobs: aws_secret_access_key: $AWS_SECRET_ACCESS_KEY environment: _JAVA_OPTIONS: '-Xms1024m -Xmx2024m' - resource_class: 2xlarge + resource_class: xlarge steps: - attach_workspace: at: ~/ @@ -102,7 +103,7 @@ jobs: aws_secret_access_key: $AWS_SECRET_ACCESS_KEY environment: _JAVA_OPTIONS: '-Xms2048m -Xmx4096m' - resource_class: 2xlarge + resource_class: xlarge steps: - attach_workspace: at: ~/ @@ -122,7 +123,7 @@ jobs: aws_secret_access_key: $AWS_SECRET_ACCESS_KEY environment: _JAVA_OPTIONS: '-Xms2048m -Xmx4096m' - resource_class: 2xlarge + resource_class: xlarge parallelism: 2 steps: - attach_workspace: @@ -177,8 +178,6 @@ jobs: -Dproject.settings="web-client/sonar-project.properties" \ -Dsonar.login="${UI_SONAR_TOKEN}" \ -Dsonar.host.url="https://sonarcloud.io" - - store_artifacts: - path: ~/project/combined-coverage e2e-pa11y: docker: @@ -188,7 +187,7 @@ jobs: aws_secret_access_key: $AWS_SECRET_ACCESS_KEY environment: _JAVA_OPTIONS: '-Xms2048m -Xmx4096m' - resource_class: 2xlarge + resource_class: xlarge steps: - attach_workspace: at: ~/ @@ -239,7 +238,7 @@ jobs: aws_secret_access_key: $AWS_SECRET_ACCESS_KEY environment: _JAVA_OPTIONS: '-Xms1024m -Xmx2048m' - resource_class: 2xlarge + resource_class: xlarge steps: - attach_workspace: at: ~/ @@ -276,14 +275,8 @@ jobs: - run: name: Build Docker Image command: | - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then - cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. - fi - - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then - cd web-api/runtimes/clamav && ./build.sh && cd ../../.. - fi - + cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. + cd web-api/runtimes/clamav && ./build.sh && cd ../../.. docker build -t efcms -f Dockerfile . - run: name: Setup Dynamsoft Keys @@ -291,6 +284,9 @@ jobs: - run: name: Setup ES Instance Count command: echo "export ES_INSTANCE_COUNT='$(./get-es-instance-count.sh $CIRCLE_BRANCH)'" >> $BASH_ENV + - run: + name: Setup Honeybadger Keys + command: echo "export CIRCLE_HONEYBADGER_API_KEY='$(./get-honeybadger-keys.sh $CIRCLE_BRANCH)'" >> $BASH_ENV - run: name: 'Deploy - Web API - Terraform' command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "COGNITO_SUFFIX=${COGNITO_SUFFIX}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" -e "SES_DMARC_EMAIL=${SES_DMARC_EMAIL}" -e "ES_INSTANCE_COUNT=${ES_INSTANCE_COUNT}" --rm efcms /bin/sh -c "cd web-api/terraform/main && ../bin/deploy-app.sh ${ENV}" @@ -315,24 +311,18 @@ jobs: - run: name: Build Docker Image command: | - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then - cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. - fi - - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then - cd web-api/runtimes/clamav && ./build.sh && cd ../../.. - fi - + cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. + cd web-api/runtimes/clamav && ./build.sh && cd ../../.. docker build -t efcms -f Dockerfile . - run: name: Setup Honeybadger Keys command: echo "export CIRCLE_HONEYBADGER_API_KEY='$(./get-honeybadger-keys.sh $CIRCLE_BRANCH)'" >> $BASH_ENV - run: name: 'Deploy - Web API - Layers - Puppeteer - us-east-1' - command: if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-puppeteer.sh ${ENV} us-east-1"; fi; + command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-puppeteer.sh ${ENV} us-east-1" - run: name: 'Deploy - Web API - Layers - ClamAV - us-east-1' - command: if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-clamav.sh ${ENV} us-east-1"; fi; + command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-clamav.sh ${ENV} us-east-1" - run: name: 'Deploy - Web API - Serverless - Public API - us-east-1' command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" -e "CIRCLE_HONEYBADGER_API_KEY=${CIRCLE_HONEYBADGER_API_KEY}" -v $(pwd)/.cache:/home/app/.cache --rm efcms /bin/sh -c "./web-api/run-serverless-public-api.sh ${ENV} us-east-1" @@ -399,24 +389,18 @@ jobs: - run: name: Build Docker Image command: | - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then - cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. - fi - - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then - cd web-api/runtimes/clamav && ./build.sh && cd ../../.. - fi - + cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. + cd web-api/runtimes/clamav && ./build.sh && cd ../../.. docker build -t efcms -f Dockerfile . - run: name: Setup Honeybadger Keys command: echo "export CIRCLE_HONEYBADGER_API_KEY='$(./get-honeybadger-keys.sh $CIRCLE_BRANCH)'" >> $BASH_ENV - run: name: 'Deploy - Web API - Layers - Puppeteer - us-west-1' - command: if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-puppeteer.sh ${ENV} us-west-1"; fi; + command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-puppeteer.sh ${ENV} us-west-1" - run: name: 'Deploy - Web API - Layers - ClamAV - us-west-1' - command: if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-clamav.sh ${ENV} us-west-1"; fi; + command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "./web-api/run-serverless-clamav.sh ${ENV} us-west-1" - run: name: 'Deploy - Web API - Serverless - Public API - us-west-1' command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" -e "CIRCLE_HONEYBADGER_API_KEY=${CIRCLE_HONEYBADGER_API_KEY}" -v $(pwd)/.cache:/home/app/.cache --rm efcms /bin/sh -c "./web-api/run-serverless-public-api.sh ${ENV} us-west-1" @@ -477,14 +461,8 @@ jobs: - run: name: Build Docker Image command: | - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/puppeteer) = "true" ]]; then - cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. - fi - - if [[ $(./web-api/deploy-diff.sh $ENV web-api/runtimes/clamav) = "true" ]]; then - cd web-api/runtimes/clamav && ./build.sh && cd ../../.. - fi - + cd web-api/runtimes/puppeteer && ./build.sh && cd ../../.. + cd web-api/runtimes/clamav && ./build.sh && cd ../../.. docker build -t efcms -f Dockerfile . - run: name: Setup Honeybadger Keys @@ -522,9 +500,68 @@ jobs: - run: name: 'Deploy - Web API - Cognito Customize' command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" --rm efcms /bin/sh -c "cd web-api && ./setup-cognito-ui.sh ${ENV}" + - run: + name: 'Deploy - Web API - Cognito Create Users' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "USTC_ADMIN_PASS=${USTC_ADMIN_PASS}" --rm efcms /bin/sh -c "cd web-api && ./setup-cognito-users.sh ${ENV}" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Web API - Cognito Create Court Users' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "USTC_ADMIN_PASS=${USTC_ADMIN_PASS}" --rm efcms /bin/sh -c "cd web-api && ./setup-court-users.sh ${ENV}" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Web API - Cognito Create IRS User' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "USTC_ADMIN_PASS=${USTC_ADMIN_PASS}" --rm efcms /bin/sh -c "cd web-api && ./setup-irs-user.sh ${ENV}" + else + echo "skipping…" + fi - run: name: 'Deploy - Web API - Run Migrations' command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "DYNAMODB_ENDPOINT=dynamodb.us-east-1.amazonaws.com" --rm efcms /bin/sh -c "npm run build:assets && ./web-api/run-umzug.sh ${ENV}" + - run: + name: 'Deploy - Web API - Smoke Tests - us-east-1' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" --rm efcms /bin/sh -c "cd web-api && node smoke-tests.js ${ENV} us-east-1" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Web API - Smoke Tests - us-west-1' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" --rm efcms /bin/sh -c "cd web-api && node smoke-tests.js ${ENV} us-west-1" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Cypress Smoke Tests' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" --rm efcms /bin/sh -c "CYPRESS_BASE_URL='https://ui-$ENV.$EFCMS_DOMAIN' ENV=${ENV} npm run cypress:smoketests" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Pa11y Smoke Tests' + command: | + if [ "${CIRCLE_BRANCH}" != "migration" ] && [ "${CIRCLE_BRANCH}" != "master"]; then + docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "ENV=${ENV} npm run test:pa11y:smoketests" + else + echo "skipping…" + fi + - run: + name: 'Deploy - Cognito Authorizer Check' + command: docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "find web-api/*.yml | ENV=${ENV} xargs node web-api/verify-authorizers.js" - store_artifacts: path: /home/app/cypress-smoketests/videos/ diff --git a/.gitignore b/.gitignore index 5b740380fe4..8b4d2ce9a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,8 @@ web-api/runtimes/clamav/clamav_lambda_layer.tar.gz web-api/runtimes/clamav/lib web-api/storage/s3/* web-api/terraform/template/cognito-triggers/index.js.zip +web-api/terraform/template/cognito-authorizer/index.js.zip +web-api/terraform/template/log-forwarder/index.js.zip web-client/.cache/ web-client/coverage-e2e web-client/coverage-integration/* diff --git a/Dockerfile b/Dockerfile index 106ba5d9eb3..d4f79756001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM cypress/base:12.13.0 +FROM cypress/base:12.16.0 RUN echo "recache again" diff --git a/Dockerfile-CI b/Dockerfile-CI index 9455370fc9c..442976e4ad9 100644 --- a/Dockerfile-CI +++ b/Dockerfile-CI @@ -1,4 +1,4 @@ -FROM cypress/base:12.13.0 +FROM cypress/base:12.16.0 WORKDIR /home/app/ef-cms @@ -24,4 +24,4 @@ RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libc git bash openssh-client python python-dev python-pip python-setuptools ca-certificates less \ unzip wget jq shellcheck clamav -RUN freshclam \ No newline at end of file +RUN freshclam diff --git a/README.md b/README.md index 544e9492a6d..77417646dcc 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ The backlog is stored [in GitHub Issues in Flexion’s repository](https://githu To exercise the CI/CD pipeline locally, run the following: -`./test-all.sh` +`./docker-test-all.sh` This will run the linter, Shellcheck, audit, build, test, Cypress, Cerebral tests, Pa11y, etc. over all the components. diff --git a/cypress/integration/petitions-clerk-creates-a-case.spec.js b/cypress/integration/petitions-clerk-creates-a-case.spec.js index 83f9db55b42..98443d89eed 100644 --- a/cypress/integration/petitions-clerk-creates-a-case.spec.js +++ b/cypress/integration/petitions-clerk-creates-a-case.spec.js @@ -22,31 +22,12 @@ describe('Create case and submit to IRS', function () { fillInCreateCaseFromPaperForm(); + cy.server(); + cy.route('POST', '**/paper').as('postPaperCase'); cy.get('#submit-case').click(); - }); - - it('should display a create case header', () => { - const banner = cy.get('.big-blue-header'); - banner.contains('Create Case'); - }); - - it('should display a tile for party information, case information, irs notice, and attachments each with edit buttons', () => { - cy.get('#parties-card').contains('Parties').find('button'); - - cy.get('#case-information-card') - .contains('Case Information') - .find('button'); - - cy.get('#irs-notice-card').contains('IRS Notice').find('button'); - - cy.get('#attachments-card').contains('Attachments').find('button'); - }); - - it('should display serve to irs button', () => { - cy.get('#submit-case').should('exist'); - }); - - it('should display save for later button', () => { - cy.get('#save-for-later').should('exist'); + cy.wait('@postPaperCase'); + cy.get('@postPaperCase').should(xhr => { + expect(xhr.responseBody).to.have.property('docketNumber'); + }); }); }); diff --git a/cypress/integration/start-a-case-practitioner.spec.js b/cypress/integration/start-a-case-practitioner.spec.js index a35085d1b82..05118b94d93 100644 --- a/cypress/integration/start-a-case-practitioner.spec.js +++ b/cypress/integration/start-a-case-practitioner.spec.js @@ -11,9 +11,9 @@ describe('Start a case as a practitioner ', () => { cy.task('seed'); }); - it('go to the practitioner dashboard and expect that a case list table is displayed with 2 cases', () => { + it('go to the practitioner dashboard and expect that a case list table is displayed with 3 cases', () => { navigateToDashboard('privatePractitioner'); - getCaseList().should('have.length', 2); + getCaseList().should('have.length', 3); }); it('click the start a case button', () => { @@ -24,8 +24,8 @@ describe('Start a case as a practitioner ', () => { fillInAndSubmitForm(); }); - it('expect the case list to be displayed with 3 items now', () => { + it('expect the case list to be displayed with 4 items now', () => { getCaseList().should('exist'); - getCaseList().should('have.length', 3); + getCaseList().should('have.length', 4); }); }); diff --git a/docker-test-all.sh b/docker-test-all.sh index f99cde3e769..979a238d0ed 100755 --- a/docker-test-all.sh +++ b/docker-test-all.sh @@ -2,15 +2,23 @@ # This runs the same build steps that run in Circle, except sonar rm -rf node_modules dist .elasticsearch .dynamodb -npm i +npm ci + docker build -t efcms -f Dockerfile . + docker run --rm efcms /bin/sh -c 'npm run lint' + docker run --rm efcms /bin/sh -c './run-shellcheck.sh' + docker run -v "$(pwd)/shared/coverage:/home/app/shared/coverage" --rm efcms /bin/sh -c 'npm run test:shared' + docker run -v "$(pwd)/web-api/coverage:/home/app/web-api/coverage" --rm efcms /bin/sh -c 'npm run test:api' + docker run -v "$(pwd)/web-client/coverage:/home/app/web-client/coverage" --rm -e SKIP_CACHE_INVALIDATION=true efcms /bin/sh -c \ '(npm run start:api &) && ./wait-until.sh http://localhost:3000/api/swagger && npm run test:client' + docker run --rm -e SKIP_CACHE_INVALIDATION=true -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \ '(npx run-p start:api start:client:ci &) && ./wait-until.sh http://localhost:3000/api/swagger && ./wait-until.sh http://localhost:1234 && npm run test:pa11y' + docker run --rm -e SKIP_CACHE_INVALIDATION=true -e SLS_DEBUG=* -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \ '(npx run-p start:api start:client:ci &) && ./wait-until.sh http://localhost:3000/api/swagger && ./wait-until.sh http://localhost:1234 && npm run cypress' diff --git a/docs/CASE_NAMES.md b/docs/CASE_NAMES.md new file mode 100644 index 00000000000..edd2c36eb08 --- /dev/null +++ b/docs/CASE_NAMES.md @@ -0,0 +1,22 @@ +# Case Names + +There are several values used throughout the system to identify cases by name. + +`caseCaptionWithPostfix`: +* Not stored directly on the case but can be computed when needed by appending the `CASE_CAPTION_POSTFIX` constant to the `caseCaption` +* Example: `Selma Horn & Cairo Harris, Petitioners v. Commissioner of Internal Revenue, Respondent` + +`caseCaption`: +* The only computed name value stored directly on the case in persistence +* Example: `Selma Horn & Cairo Harris, Petitioners` + +`caseTitle`: +* Not stored directly on the case - use method `Case.getCaseTitle(caseCaption)` to retrieve value +* Displayed in tables and work queues in the UI to identify a case for internal users +* Persisted on work items to be displayed in the work queues to eliminate the need to retrieve the value from each individual case +* Example: `Selma Horn & Cairo Harris` + +`caseCaptionExtension`: +* Not stored on the case, but can be computed by getting the `caseTitle` and replacing it with '' in the `caseCaption` +* Typically used in PDFs for proper case caption placement +* Example: `Petitioner(s)` \ No newline at end of file diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 06209ef87b7..3e787a5fed1 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -15,6 +15,10 @@ If you're standing up a new environment, it is critical that you run the scripts > ``` ROLLBACK_COMPLETE ``` If you see this error in the AWS Cloudformation Stacks for your `$ENVIRONMENT`, there was an error configuring this stack. This stack will need to be DELETED prior to attempting to deploy again. We hope to identify the causes of these situations as well as avoid downtime by utilizing blue/green deploy strategies. +#### Limit for stack has been exceeded + +If the deploy process fails with `ServerlessError: Limit for stack has been exceeded`, that means that the number of stacks in CloudFormation has exceeded AWS’s allowable limits. By default, [the maximum number is 200](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html), and AWS’s proposed solution is to "delete stacks that you don't need or request an increase in the maximum number of stacks in your AWS account." + #### repository xxxxx.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1 not found > ```Error response from daemon: repository xxxxx.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1 not found``` @@ -73,7 +77,7 @@ If this occurs, rerun the build. ``` Serverless Error --------------------------------------- - + ServerlessError: An error occurred: CasePublicSearchLambdaFunction - Code storage limit exceeded. (Service: AWSLambdaInternal; Status Code: 400; Error Code: CodeStorageExceededException ``` @@ -109,8 +113,6 @@ To revert your `serverless-prune-plugin`, just change `before` back to `after` o `[illegal_argument_exception] Limit of total fields [4000] in index [efcms] has been exceeded` -This error often occurs when we are indexing too many dynamic keys or nested objects with Elasticsearch and reach our total field limit. To investigate, run the command - -`./web-api/check-elasticsearch-mappings.sh [ENV]` +This error often occurs when we are indexing too many dynamic keys or nested objects with Elasticsearch and reach our total field limit. -The script will output data related to the mapping for the environment and can help pinpoint areas to look into further. To filter data from indexing, add fields or keys to the filtering functions in `processStreamRecordsInteractor.js`. \ No newline at end of file +The script will output data related to the mapping for the environment and can help pinpoint areas to look into further. To filter data from indexing, add fields or keys to the filtering functions in `processStreamRecordsInteractor.js`. diff --git a/docs/entities/Case.md b/docs/entities/Case.md index ecf218e8273..d98b54f9dfe 100644 --- a/docs/entities/Case.md +++ b/docs/entities/Case.md @@ -10,6 +10,11 @@ Restricted > `string` | optional +##### Maximum limit + + +`50` + ### automaticBlocked @@ -80,6 +85,11 @@ The name of the party bringing the case, e.g. "Carol Williams, Petitioner," "Mar > `string` | required +##### Maximum limit + + +`500` + ### caseId @@ -94,6 +104,11 @@ Restricted > `string` | optional +##### Maximum limit + + +`500` + ### caseType > `string` | required @@ -239,6 +254,11 @@ Case caption before modification. > `string` | optional +##### Maximum limit + + +`500` + ##### Can be null. ### initialDocketNumberSuffix @@ -248,6 +268,11 @@ Case docket number suffix before modification. > `string` | optional +##### Maximum limit + + +`2` + ##### Can be null. ### irsNoticeDate @@ -257,6 +282,11 @@ Last date that the petitioner is allowed to file before. > `date` | optional +##### Maximum date + + +`now` + ##### Can be null. ### irsPractitioners @@ -311,6 +341,13 @@ Reminder for clerks to review the notice of trial date. > `date` | optional +### orderDesignatingPlaceOfTrial + + +Reminder for clerks to review the Order Designating Place of Trial. + +> `boolean` | optional + ### orderForAmendedPetition @@ -761,7 +798,7 @@ Time of day when this case goes to trial. ##### Regex Pattern -`/^[0-9]+:([0-5][0-9])$/` +`/^[0-9]{1,2}:([0-5][0-9])$/` ### userId @@ -773,6 +810,11 @@ Restricted > `string` | optional +##### Maximum limit + + +`50` + ### workItems diff --git a/docs/entities/CaseDeadline.md b/docs/entities/CaseDeadline.md index d89d3c34204..110b63e438a 100644 --- a/docs/entities/CaseDeadline.md +++ b/docs/entities/CaseDeadline.md @@ -34,3 +34,19 @@ When the Case Deadline expires. User provided description of the Case Deadline. > `string` | required + +##### Maximum limit + + +`120` + +##### Minimum limit + + +`1` + +### entityName + +> `string` | required + +##### Can be CaseDeadline. diff --git a/docs/entities/DocketRecord.md b/docs/entities/DocketRecord.md index 5db452af047..3384831688e 100644 --- a/docs/entities/DocketRecord.md +++ b/docs/entities/DocketRecord.md @@ -37,6 +37,12 @@ Restricted ##### Can be null. +### entityName + +> `string` | required + +##### Can be DocketRecord. + ### eventCode @@ -408,6 +414,11 @@ Date that this Docket Record item was filed. > `date` | required +##### Maximum date + + +`now` + ### index diff --git a/docs/entities/Document.md b/docs/entities/Document.md index 499d308e22f..db3ba9bee43 100644 --- a/docs/entities/Document.md +++ b/docs/entities/Document.md @@ -14,6 +14,9 @@ ### archived + +A document that was archived instead of added to the Docket Record. + > `boolean` | optional ### caseId @@ -44,6 +47,15 @@ When the Document was added to the system. > `date` | required +### date + + +An optional date used when generating a fully concatenated document title. + +> `date` | optional + +##### Can be null. + ### docketNumber @@ -56,7 +68,17 @@ Docket Number of the associated Case in XXXXX-YY format. `/^(\d{3,5}-\d{2})$/` -### documentContents +### docketNumbers + + +Optional Docket Number text used when generating a fully concatenated document title. + +> `string` | optional + +### documentContentsId + + +The S3 ID containing the text contents of the document. > `string` | optional @@ -438,6 +460,12 @@ The type of this document. ##### Can be null. +### entityName + +> `string` | required + +##### Can be Document. + ### eventCode > `string` | optional @@ -455,6 +483,11 @@ Date that this Document was filed. > `date` | required +##### Maximum date + + +`now` + ### freeText > `string` | optional @@ -491,6 +524,12 @@ A lodged document is awaiting action by the judge to enact or refuse. > `boolean` | optional +### numberOfPages + +> `number` | optional + +##### Can be null. + ### objections > `string` | optional @@ -505,10 +544,16 @@ A lodged document is awaiting action by the judge to enact or refuse. ### partyPrimary + +Use the primary contact to compose the filedBy text. + > `boolean` | optional ### partySecondary + +Use the secondary contact to compose the filedBy text. + > `boolean` | optional ### pending @@ -521,8 +566,14 @@ A lodged document is awaiting action by the judge to enact or refuse. ### privatePractitioners + +Practitioner names to be used to compose the filedBy text. + > `array` | optional + +An array of objects. + ### processingStatus > `string` | optional @@ -531,10 +582,6 @@ A lodged document is awaiting action by the judge to enact or refuse. > `date` | optional -### qcByUser - -> `object` | optional - ### qcByUserId > `string` | optional @@ -549,10 +596,40 @@ A lodged document is awaiting action by the judge to enact or refuse. > `string` | optional +##### Allowed Values + + + - `primaryDocument` + - `primarySupportingDocument` + - `secondaryDocument` + - `secondarySupportingDocument` + - `supportingDocument` + ### scenario > `string` | optional +##### Allowed Values + + + - `Standard` + - `Nonstandard A` + - `Nonstandard B` + - `Nonstandard C` + - `Nonstandard D` + - `Nonstandard E` + - `Nonstandard F` + - `Nonstandard G` + - `Nonstandard H` + - `Type A` + - `Type B` + - `Type C` + - `Type D` + - `Type E` + - `Type F` + - `Type G` + - `Type H` + ### secondaryDate @@ -560,11 +637,10 @@ A secondary date associated with the document, typically related to time-restric > `date` | optional -### secondaryDocument +### servedAt -> `object` | optional -### servedAt +When the document is served on the parties. > `date` | optional @@ -572,10 +648,21 @@ A secondary date associated with the document, typically related to time-restric > `array` | optional + +An array of objects. + ### serviceDate + +Certificate of service date. + > `date` | optional +##### Maximum date + + +`now` + ##### Can be null. ### serviceStamp @@ -600,12 +687,6 @@ A secondary date associated with the document, typically related to time-restric ##### Can be null. -### status - -> `string` | optional - -##### Can be served. - ### supportingDocument > `string` | optional @@ -614,105 +695,10 @@ A secondary date associated with the document, typically related to time-restric ### trialLocation -> `conditional` | optional - - -*Must match 1 of the following conditions:* - -#### Condition #1 for `trialLocation`: - -> `string` -##### Allowed Values - - - - `Fresno, California` - - `Tallahassee, Florida` - - `Pocatello, Idaho` - - `Peoria, Illinois` - - `Wichita, Kansas` - - `Shreveport, Louisiana` - - `Portland, Maine` - - `Billings, Montana` - - `Albany, New York` - - `Syracuse, New York` - - `Bismarck, North Dakota` - - `Aberdeen, South Dakota` - - `Burlington, Vermont` - - `Roanoke, Virginia` - - `Cheyenne, Wyoming` - - `Birmingham, Alabama` - - `Mobile, Alabama` - - `Anchorage, Alaska` - - `Phoenix, Arizona` - - `Little Rock, Arkansas` - - `Los Angeles, California` - - `San Diego, California` - - `San Francisco, California` - - `Denver, Colorado` - - `Hartford, Connecticut` - - `Washington, District of Columbia` - - `Jacksonville, Florida` - - `Miami, Florida` - - `Tampa, Florida` - - `Atlanta, Georgia` - - `Honolulu, Hawaii` - - `Boise, Idaho` - - `Chicago, Illinois` - - `Indianapolis, Indiana` - - `Des Moines, Iowa` - - `Louisville, Kentucky` - - `New Orleans, Louisiana` - - `Baltimore, Maryland` - - `Boston, Massachusetts` - - `Detroit, Michigan` - - `St. Paul, Minnesota` - - `Jackson, Mississippi` - - `Kansas City, Missouri` - - `St. Louis, Missouri` - - `Helena, Montana` - - `Omaha, Nebraska` - - `Las Vegas, Nevada` - - `Reno, Nevada` - - `Albuquerque, New Mexico` - - `Buffalo, New York` - - `New York City, New York` - - `Winston-Salem, North Carolina` - - `Cincinnati, Ohio` - - `Cleveland, Ohio` - - `Columbus, Ohio` - - `Oklahoma City, Oklahoma` - - `Portland, Oregon` - - `Philadelphia, Pennsylvania` - - `Pittsburgh, Pennsylvania` - - `Columbia, South Carolina` - - `Knoxville, Tennessee` - - `Memphis, Tennessee` - - `Nashville, Tennessee` - - `Dallas, Texas` - - `El Paso, Texas` - - `Houston, Texas` - - `Lubbock, Texas` - - `San Antonio, Texas` - - `Salt Lake City, Utah` - - `Richmond, Virginia` - - `Seattle, Washington` - - `Spokane, Washington` - - `Charleston, West Virginia` - - `Milwaukee, Wisconsin` - -#### Condition #2 for `trialLocation`: - -> `string` - -##### Regex Pattern +An optional trial location used when generating a fully concatenated document title. - -`/^[a-zA-Z ]+, [a-zA-Z ]+, [0-9]+$/` - -#### Condition #3 for `trialLocation`: - -> `string` +> `string` | optional ##### Can be null. diff --git a/docs/images/client-dependencies.jpg b/docs/images/client-dependencies.jpg index 25530d3cb19..7505698dc5e 100644 Binary files a/docs/images/client-dependencies.jpg and b/docs/images/client-dependencies.jpg differ diff --git a/docs/images/server-dependencies.jpg b/docs/images/server-dependencies.jpg index f8e38500041..6826f0dda84 100644 Binary files a/docs/images/server-dependencies.jpg and b/docs/images/server-dependencies.jpg differ diff --git a/docs/zap-report.html b/docs/zap-report.html index 5512b7df2d9..dbaae9e97ab 100644 --- a/docs/zap-report.html +++ b/docs/zap-report.html @@ -85,13 +85,13 @@