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

GM - Prevent deletion of sub_service_requests record if already pushed to Fulfillment #2966

Merged
merged 6 commits into from Sep 30, 2022

Conversation

6reg
Copy link
Collaborator

@6reg 6reg commented Sep 12, 2022

Users shouldn't be able to Delete a Request that has been pushed to SPARCFulfillment. The way users accomplish this is to use "Add Modify Request" and then on the dashboard screen delete the services from the cart. When the last service is deleted it triggers the SubServiceRequest to also be destroyed.
If this happens the VisitReport (and possibly other things) in SPARC Fulfillment will fail because the protocol row is storing the ID of a sub service request that will no longer exist.

Pivotal Ticket

[#181758085]

app/models/sub_service_request.rb Outdated Show resolved Hide resolved
@jleonardw9
Copy link
Contributor

@amcates Greg's only failing test is that survey thing again. Should I put a story in to clean that up and delete it? I don't think it's doing us any good if it passes locally and fails on Travis.

@amcates
Copy link
Collaborator

amcates commented Sep 23, 2022

@jleonardw9 Yes, let's remove that failing spec if it's causing issues

@6reg 6reg marked this pull request as draft September 26, 2022 10:06
@6reg 6reg marked this pull request as ready for review September 26, 2022 15:25
Copy link
Contributor

@jleonardw9 jleonardw9 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!

@amcates amcates merged commit 4a8cfa0 into v3.10.0 Sep 30, 2022
@amcates amcates deleted the prevent-delete-if-request-pushed-to-fulfillment branch September 30, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants