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

Prevent accepted resubmit #187434120 #4504

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

Conversation

tofarr
Copy link
Contributor

@tofarr tofarr commented Apr 17, 2024

  • Do not resubmit if there is already an accepted return with the same SSN.
  • Added a feature flag so we can turn this off if it is interfering with testing

Copy link

Heroku app: https://gyr-review-app-4504-b29341d4c2fa.herokuapp.com/
View logs: heroku logs --app gyr-review-app-4504 (optionally add --tail)

end

context "when there is already a non-accepted submission in a different account with the same SSN" do
#let!(:efile_submission) { create :efile_submission, :accepted, :for_state, data_source: intake }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we nuke this comment?

Copy link
Contributor

@rickreyhsig rickreyhsig left a comment

Choose a reason for hiding this comment

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

LGTM, I think the comment just needs to be removed.

@@ -17,6 +17,13 @@ def save
efile_info = StateFileEfileDeviceInfo.find_by(event_type: "submission", intake: @intake)
efile_info&.update!(attributes_for(:state_file_efile_device_info))

unless Flipper.enabled?(:allow_duplicate_submissions)
if accepted_submissions_with_same_ssn(@intake).any?
Rails.logger.warn "#{@intake.state_code}#{@intake.id} was not submitted because there is already an accepted submission for that ssn"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this sufficient notification? would it be worth elevating this to a slack message or sentry warning or similar?

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.

None yet

3 participants