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

Removing Spotlight::HarvestingCompleteMailer.harvest_failed UI call #33

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Sep 9, 2022

Given that we're uploading via the UI, we don't need to send an email when we fail the save of the OaipmhHarvester object. Instead let's flash the errors and not send an email.

Then if the harvester saves, when we run the
Spotlight::Resources::PerformHarvestsJob.perform_later that can send the email notifying of error.

See https://github.com/harvard-lts/CURIOSity/issues/185

Testing Instructions:

The goal is to submit an OAI PMH Harvester that has invalidate form data.

In the UI, submit a new OAI PMH Harvester without a set. (This will require removing the required=true HTML 5 property on the attribute). When you submit the form with invalid data:

  1. You will see a flash error message
  2. No email will be sent.

Prior to this change, you will see a flash error message and an email will be sent.

Given that we're uploading via the UI, we don't need to send an email
when we fail the save of the OaipmhHarvester object.  Instead let's
flash the errors and not send an email.

Then if the harvester saves, when we run the
`Spotlight::Resources::PerformHarvestsJob.perform_later` that can send
the email notifying of error.

See https://github.com/harvard-lts/CURIOSity/issues/185
Copy link
Contributor

@phil-plencner-hl phil-plencner-hl left a comment

Choose a reason for hiding this comment

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

Confirmed that before this change, if I submit a Harvest request without a set name it throws an error in the browser and emails me.

After the change it throws the same error in the browser and does not email me.

Approved.

@phil-plencner-hl phil-plencner-hl merged commit 03f37b1 into main Sep 12, 2022
@phil-plencner-hl phil-plencner-hl deleted the jeremyf---harvard-lts---CURIOSity#185 branch September 12, 2022 15:54
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