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

CDPT-2390 CT: Hide Send Commissioning Email button for Offender SAR Complaints #2534

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MeenaModhvadia
Copy link
Contributor

Description

The functionality to send a commissioning email should not be available for the case type of Offender SAR Complaints data requests. The button 'send commissioning email' needs to be hidden.

Self-review checklist

  • (1) Quick stakeholder demo done OR
  • (2) ...bug with before and after screenshots
  • (3) Tests passing
  • (4) Branch ready to be merged (not work in progress)
  • (5) No superfluous changes in diff
  • (6) No TODO's without new ticket numbers
  • (7) PR Prefixed with ticket number e.g. CT-7654 ...
  • (8) Data migration script is created if any of letter templates is changed

Screenshots

Related JIRA tickets

https://dsdmoj.atlassian.net/browse/CDPT-2390

Deployment

Manual testing instructions

Create offender sar and link to complaint types Standard, ICO & Litigation.

@@ -44,7 +44,7 @@ div class="case"
td
span = @commissioning_document&.download_link

- if @data_request_area.data_request_emails.blank? && policy(@case).can_record_data_request?
- if @data_request_area.data_request_emails.blank? && policy(@case).can_record_data_request? && [email protected]_sar_complaint?
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can replace policy(@case).can_record_data_request? with a policy method that relates to sending the email and that will differ depending in whether the case is a complaint or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is an action of 'send_day_1_email' that is not enabled for complaints which is what causes the error, so that is what should be used to determine if sending is allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants