From 38c170a315b2acbe4ad99de72be2cc30db75834b Mon Sep 17 00:00:00 2001 From: dfong-adh <151783381+dfong-adh@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:11:30 -0700 Subject: [PATCH] Update scripts.md --- .../decision-reviews/engineering/scripts.md | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/products/decision-reviews/engineering/scripts.md b/products/decision-reviews/engineering/scripts.md index 9b9eec376d5..30d14a6e8f6 100644 --- a/products/decision-reviews/engineering/scripts.md +++ b/products/decision-reviews/engineering/scripts.md @@ -159,24 +159,18 @@ end def remediation_info(lighthouse_upload_id) upload = AppealSubmissionUpload.find_by(lighthouse_upload_id:) appeal_submission = upload.appeal_submission - user_uuid = appeal_submission.user_uuid - - # Same as get_mpi_profile_with_user_uuid method - mpi_service = MPI::Service.new - idme_profile = mpi_service.find_profile_by_identifier(identifier: user_uuid, identifier_type: 'idme')&.profile - logingov_profile = mpi_service.find_profile_by_identifier(identifier: user_uuid, identifier_type: 'logingov')&.profile - mpi_profile = idme_profile || logingov_profile attachment = upload.decision_review_evidence_attachment - raw_filename = JSON.parse(upload.decision_review_evidence_attachment.file_data)['filename'] - + unmasked_filename = JSON.parse(upload.decision_review_evidence_attachment.file_data)['filename'] + s3_link = "https://us-gov-west-1.console.amazonaws-us-gov.com/s3/object/dsva-vagov-prod-notice-of-disagreement?region=us-gov-west-1&prefix=decision_review/#{attachment.guid}/#{unmasked_filename}" + { - icn: mpi_profile.icn, form_type: appeal_submission.type_of_appeal, - upload_timestamp: attachment.created_at, - filename: raw_filename.gsub(/(?<=.{3})[^_-](?=.{6})/, '*'), + icn: appeal_submission.get_mpi_profile.icn, decision_review_evidence_attachment_uuid: attachment.guid, - raw_filename: + filename: unmasked_filename.gsub(/(?<=.{3})[^_-](?=.{6})/, '*'), + upload_timestamp: attachment.created_at.in_time_zone("Pacific Time (US & Canada)").strftime('%B %-d, %Y, %H:%M:%S (UTC%z)'), + s3_link: } end ```