Skip to content

Rake Generator for Legacy Appeals

calvincostaBAH edited this page Jul 19, 2023 · 11 revisions

Description

If you ever need to create Legacy Appeals for your environment, you can run the rake generator bundle exec rake db:generate_legacy_appeals[:add_special_issues, :task_creation]. This generator results in 25 new Legacy Appeals to use within Caseflow/DB. The Legacy Appeals are generated by using LegacyAppealFactory to create records within FACOLS, inserting the required fields including case_attrs, staff_attrs, and decass_attrs. Once the records are created within FACOLS, the generator builds each Legacy Appeal within Caseflow using it's case_record. The rake generator also allows for two special arguments, :add_special_issues, which adds issues to the Legacy Appeal, and :task_creation, which creates tasks for the Legacy Appeal based on the user input.

Note: This only works for Legacy Appeals

Location

To find if this rake generator is available in your environment you can run the command bundle exec rake -T. If you want to take a closer look at the generator you can find it within the file seed_legacy_appeals.rake.

How to use

Create Legacy Appeals

To create Legacy Appeals, use the command bundle exec rake db:generate_legacy_appeals. The script will ask you to enter the CSS ID of the user that you want to assign the Legacy Appeals to, whether it be a demo user such as "BVASCASPER1" or a UAT user such as "TCASEY_JUDGE". These legacy appeals will appear within the user's Queue.

Create Legacy Appeals with Special Issues

To create Legacy Appeals with Special Issues, use the command bundle exec rake db:generate_legacy_appeals[true]. The script will ask you to enter the CSS ID of the user that you want to assign the Legacy Appeals to, whether it be a demo user such as "BVASCASPER1" or a UAT user such as "TCASEY_JUDGE". These legacy appeals will be generated with special issues and appear within the user's Queue.

Create Legacy Appeals with Tasks

To create Legacy Appeals with Tasks, use the command bundle exec rake db:generate_legacy_appeals[false,true]. The script will ask you to enter the CSS ID of the user that you want to assign the Legacy Appeals to, whether it be a demo user such as "BVASCASPER1" or a UAT user such as "TCASEY_JUDGE". Once the user is inputted, the script will ask you what type of task do you want to add to the Legacy Appeals. The options include HearingTask, JudgeTask, AttorneyTask, ReviewTask, and DistributionTask. There are different requirements and actions that these options have:

  • HearingTask

    • Creates a HearingTask and a child ScheduleHearingTask for the Legacy Appeal
    • Both tasks will be assigned to the BVA
    • Location in FACOLS is set to Location 57, to simulate a case in Vacols with a Hearing attached/requested.
  • DistributionTask

    • Note: Since this is a Legacy Appeal, a Distribution Task will not be created as Legacy Appeals should not have a Distribution Task attached to them. This option will only set the FACOLS location to "81" which refers to "Case Storage". This location is the equivalent of the distribution pool that we find AMA Appeals in.
  • JudgeTask (Judge User Required)

    • Requires the user selected to be a judge within Vacols, will not run otherwise.
    • Creates a JudgeAssignTask and assigns it to the selected Judge
  • AttorneyTask ( Judge and Attorney Users Required )

    • Requires a Judge/Attorney to be selected, will not run otherwise
    • Once the option AttorneyTask is selected, the script will ask for the subsequent Judge/Attorney User
    • Creates a JudgeDecisionReviewTask and assigns it to the selected Judge
    • Creates an AttorneyTask as a child of the JudgeDecisionReviewTask and assigns it to the selected Attorney
  • ReviewTask (Judge User Required)

    • Requires the user selected to be a judge within Vacols, will not run otherwise.
    • Creates a JudgeDecisionReviewTask and assigns it to the selected Judge

Troubleshooting

  • If running the generator on MacOS using zsh, you will need to put quotations around the rake task as follows bundle exec rake "db:generate_legacy_appeals[false,true]"

  • Generating too many legacy appeals for one user can lead to their Queue being unable to load cases.

    • One way to fix this is to bypass the Queue, and enter the case details page using the url. Inputting queue/appeals/[vacols_id] with the corresponding Vacols id into the url will get you to the specified case details page.
    • To get rid of this issue entirely, you must do a database reset. This can be achieved by running the command make reset
Clone this wiki locally