Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SeanC/APPEALS-5034 Decided non-comp issues are not getting closed as decided #20126

Merged
merged 39 commits into from
Dec 21, 2023

Conversation

seancva
Copy link
Contributor

@seancva seancva commented Dec 6, 2023

Resolves Decided non-comp issues are not getting closed as decided

Jira Description

For SC's (supplemental claims) and HLR's (higher level reviews), if the business line is not compensation or pension, the decision reviews go to what we call the "non-comp queue", a lightweight version of queue that allows users to add decisions to request issues.

When users are adding decisions, the decision issues are getting added, but the request issues are not being closed as "decided". This allows users to go back in and edit later, and do another action such as withdraw the issue.

See DecisionReviewTask.complete_with_payload! where decision issues are getting created, the task is getting closed, but the request issues are not getting closed. RequestIssue.close_decided_issue! should be called somewhere.

Description of Changes

For SC's (supplemental claims) and HLR's (higher level reviews), that are in the non-comp queue, when a user adds decision to a decision issue. The request issues are now being closed as "decided" and the completed_by_id is set to the user_id of the user that added the decision.

Acceptance Criteria

  • Code compiles correctly
  • When a user submits a decision for a non-comp decision review (via the non-comp queue), it closes the decided request issues with the status of "decided"
  • All other behavior is retained

Testing Plan

  1. Logged in as a user with non-comp claims(SC's and HLR's) in their decision review queue (ex. ACBAUERVVHAH)
  2. Navigate to the decision review queue
  3. Click on the first Supplemental Claim from the "In Progress tasks" tab
  4. Save the task id for the claim somewhere (the last 4 digits in the claims url, ex. decision_reviews/vha/tasks/9779)
  5. From the "Disposition" dropdown, select any of the options
  6. Click on the decision date field and choose any date
  7. Click on the "Complete" button
  8. Verify that the claim is now in the "Completed tasks" tab
  9. Open up the rails console and enter this command, but replace <task_id> with previously saved task_id task = Task.find(<task_id>)
Test_Instructions_ScreenShot1
  1. Note that the completed_by_id field is id of the user that just completed the disposition. (ex. ACBAUERVVHAH's id=2000006012) Command for getting user_id: User.find_by(css_id: <user's css_id>)
Test_Instructions_ScreenShot2
  1. Then run this command in the rails console task.appeal.request_issues.first
  2. Note that closed_status: "decided"
Test_Instructions_ScreenShot3
  1. Repeat steps 3-12 for a Higher Level Review

Best practices

Tests

Test Coverage

Did you include any test coverage for your code? Check below:

  • RSpec
  • Jest
  • Other

Code Climate

Your code does not add any new code climate offenses? If so why?

  • No new code climate issues added

Copy link

codeclimate bot commented Dec 6, 2023

Code Climate has analyzed commit 48f7121 and detected 0 issues on this pull request.

View more on Code Climate.

@seancva seancva added Type: Tech-Improvement Team: Saturn 🪐 A development team for the VHA business line ART: VHA labels Dec 13, 2023
@seancva seancva marked this pull request as ready for review December 13, 2023 17:32
@TylerBroyles TylerBroyles changed the base branch from master to feature/APPEALS-26499 December 14, 2023 18:49
Copy link
Contributor

@TylerBroyles TylerBroyles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I only noticed a couple of things. I also think we need a couple of new test expectations for future regression testing to verify that the completed by field is being successfully updated with the user and also that the request issues are correctly being closed out.

app/models/tasks/decision_review_task.rb Show resolved Hide resolved
Copy link
Contributor

@TylerBroyles TylerBroyles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Good job!

@craigrva craigrva merged commit 2f46c05 into feature/APPEALS-26499 Dec 21, 2023
14 checks passed
@craigrva craigrva deleted the SeanC/APPEALS-5034 branch December 21, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ART: VHA Team: Saturn 🪐 A development team for the VHA business line Type: Tech-Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants