Skip to content

Commit

Permalink
Merge pull request #21552 from department-of-veterans-affairs/HunJerB…
Browse files Browse the repository at this point in the history
…AH/FY24Q3.2-mst-pact-bugs

FY24Q3.2 MST/PACT Bug Release Branch
  • Loading branch information
cacevesva authored May 10, 2024
2 parents 15c3381 + 8e293aa commit a87044e
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 37 deletions.
4 changes: 1 addition & 3 deletions app/models/appeal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ def mst?
return decision_issues.any?(&:mst_status) unless decision_issues.empty?

request_issues.active.any?(&:mst_status) ||
(special_issue_list &&
special_issue_list.created_at < "2023-06-01".to_date &&
special_issue_list.military_sexual_trauma)
special_issue_list&.military_sexual_trauma
end

# :reek:RepeatedConditionals
Expand Down
5 changes: 1 addition & 4 deletions app/models/legacy_appeal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,7 @@ def mst?
return false unless FeatureToggle.enabled?(:mst_identification, user: RequestStore[:current_user]) &&
FeatureToggle.enabled?(:legacy_mst_pact_identification, user: RequestStore[:current_user])

issues.any?(&:mst_status) ||
(special_issue_list &&
special_issue_list.created_at < "2023-06-01".to_date &&
special_issue_list.military_sexual_trauma)
issues.any?(&:mst_status) || special_issue_list&.military_sexual_trauma
end

def pact?
Expand Down
4 changes: 2 additions & 2 deletions app/models/tasks/judge_decision_review_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def self.label
private

def ama_judge_actions
# bypass special issues page if mst/pact enabled
# bypass special issues page if mst issue tracking is enabled
return Constants.TASK_ACTIONS.JUDGE_AMA_CHECKOUT.to_h if
FeatureToggle.enabled?(:mst_identification) || FeatureToggle.enabled?(:pact_identification)
FeatureToggle.enabled?(:mst_identification)

Constants.TASK_ACTIONS.JUDGE_AMA_CHECKOUT_SPECIAL_ISSUES.to_h
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/tasks/judge_dispatch_return_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def self.label

# :reek:UtilityFunction
def ama_issue_checkout
# bypass special issues page if mst/pact enabled
# bypass special issues page if mst issue tracking is enabled
return Constants.TASK_ACTIONS.JUDGE_AMA_CHECKOUT.to_h if
FeatureToggle.enabled?(:mst_identification) || FeatureToggle.enabled?(:pact_identification)
FeatureToggle.enabled?(:mst_identification)

Constants.TASK_ACTIONS.JUDGE_AMA_CHECKOUT_SPECIAL_ISSUES.to_h
end
Expand Down
4 changes: 2 additions & 2 deletions app/repositories/task_action_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,9 @@ def cancel_task_and_return_to_sct_action(task, _)
def select_ama_review_decision_action(task)
return Constants.TASK_ACTIONS.REVIEW_VACATE_DECISION.to_h if task.appeal.vacate?

# route to decision if mst/pact toggles are enabled.
# bypass special issues page if MST is enabled
return Constants.TASK_ACTIONS.REVIEW_AMA_DECISION.to_h if
FeatureToggle.enabled?(:mst_identification) || FeatureToggle.enabled?(:pact_identification)
FeatureToggle.enabled?(:mst_identification)

Constants.TASK_ACTIONS.REVIEW_AMA_DECISION_SP_ISSUES.to_h
end
Expand Down
11 changes: 5 additions & 6 deletions client/app/components/badges/MstBadge/MstBadge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ const MstBadge = (props) => {
const { appeal } = props;

// During decision review workflow, saved/staged changes made are updated to appeal.decisionIssues
// if legacy check issues for changes, if ama check decision for changes
const issues = (appeal.isLegacyAppeal || appeal.type === 'LegacyAppeal') ? appeal.issues : appeal.decisionIssues;
const decisionIssues = appeal?.decisionIssues;

// check the issues/decisions for mst/pact changes in flight
if (issues && issues?.length > 0) {
if (!issues.some((issue) => issue.mst_status === true)) {
// check the decisions for mst changes in flight
if (decisionIssues?.length > 0) {
if (!decisionIssues.some((issue) => issue.mst_status === true)) {
return null;
}
} else if (!appeal?.mst) {
// if issues are empty/undefined, use appeal model mst check
// if decisions are empty/undefined, use appeal model mst check
return null;
}

Expand Down
11 changes: 5 additions & 6 deletions client/app/components/badges/PactBadge/PactBadge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ const PactBadge = (props) => {
const { appeal } = props;

// During decision review workflow, saved/staged changes made are updated to appeal.decisionIssues
// if legacy check issues for changes, if ama check decision for changes
const issues = (appeal.isLegacyAppeal || appeal.type === 'LegacyAppeal') ? appeal.issues : appeal.decisionIssues;
const decisionIssues = appeal?.decisionIssues;

// check the issues/decisions for mst/pact changes in flight
if (issues && issues?.length > 0) {
if (!issues.some((issue) => issue.pact_status === true)) {
// check the decisions for pact changes in flight
if (decisionIssues && decisionIssues?.length > 0) {
if (!decisionIssues.some((issue) => issue.pact_status === true)) {
return null;
}
} else if (!appeal?.pact) {
// if issues are empty/undefined, use appeal model mst check
// if decisions are empty/undefined, use appeal model mst check
return null;
}

Expand Down
1 change: 0 additions & 1 deletion client/app/queue/SelectDispositionsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class SelectDispositionsView extends React.PureComponent {
(response) => {
const { ...specialIssues } = response.body;

this.editStagedAppeal({ specialIssues });
this.setState({ specialIssues });
}
);
Expand Down
6 changes: 1 addition & 5 deletions client/app/queue/components/QueueFlowPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ class QueueFlowPage extends React.PureComponent {
} = this.props;

this.props.hideModal('cancelCheckout');
if (location.href.includes('dispositions')) {
this.props.resetDecisionOptions();
} else {
this.props.goToNextStep();
}
this.props.resetDecisionOptions();
_.each(stagedAppeals, this.props.checkoutStagedAppeal);

this.withUnblockedTransition(
Expand Down
1 change: 1 addition & 0 deletions db/seeds/mst_pact_legacy_case_appeals.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def seed!
end

# confirms the user CSS IDS are for valid users or skip
# seeds come from seed_legacy_appeals.rake
# :reek:UtilityFunction
def generate_legacy_appeals
USER_CSS_IDS.each do |id|
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/additional_legacy_remanded_appeals.rake
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ namespace :additional_legacy_remand_reasons do

else
veterans_with_like_45_appeals = %w[011899917 011899918] # UAT option for veterans

end

# set task to ATTORNEYTASK
Expand Down
5 changes: 0 additions & 5 deletions lib/tasks/seed_legacy_appeals.rake
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ namespace :db do

else
veterans_with_like_45_appeals = %w[011899917 011899918]

# veterans_with_250_appeals = %w[011899906 011899999]
end

# request CSS ID for task assignment if not given
Expand All @@ -147,9 +145,6 @@ namespace :db do
docket_number += 1
LegacyAppealFactory.stamp_out_legacy_appeals(5, file_number, user, docket_number)
end
# veterans_with_250_appeals.each do |file_number|
# LegacyAppealFactory.stamp_out_legacy_appeals(250, file_number, user)
# end
end
end
end

0 comments on commit a87044e

Please sign in to comment.