Is there an option to send an email in the event a backup fails? I see it in 7.x-3.x, but not in 8.x-4.x.

I see some code for it, such as class Mailer implements MailerInterface, but I don't see anything using that code, nor the option in the Settings Profiles page.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

solideogloria created an issue. See original summary.

damienmckenna’s picture

Title: Send email on failure? » Send email on failure
Category: Support request » Feature request

Let's make this a feature request, because I don't think it's possible either.

damienmckenna’s picture

Version: 8.x-4.x-dev » 5.0.x-dev

Moving 8.x-4.x issues to 5.0.x because the older branch is no longer supported.

larisse’s picture

Status: Active » Needs review
StatusFileSize
new5.8 KB

Hi! I tried to work on this feature, here is a patch. I think that is necessary create tests if this feature be committed.

Status: Needs review » Needs work

The last submitted patch, 4: 3133933-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

larisse’s picture

Status: Needs work » Needs review
StatusFileSize
new6.37 KB

A new patch.

paulocs’s picture

StatusFileSize
new2.8 KB
new7.67 KB

Fixing patch to add a properly key to the email.

damienmckenna’s picture

Version: 5.0.x-dev » 5.1.x-dev
Status: Needs review » Needs work
Parent issue: » #3223059: Plan for Backup and Migrate 5.1.0

#3236380 was committed, so this needs a reroll.

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new3.87 KB

Rerolled patch #7 for the 5.1.x branch, please review it.

ramonvasconcelos’s picture

Assigned: Unassigned » ramonvasconcelos

I'll review the patch.

WagnerMelo’s picture

Hi, i'll review it.

WagnerMelo’s picture

Assigned: WagnerMelo » Unassigned

sorry.

ramonvasconcelos’s picture

Assigned: Unassigned » ramonvasconcelos

The reroll didn't work for me. It doesn't have all the changes made in the previous patchs.
I'll make some more tests and see if i can fix it.

ramonvasconcelos’s picture

StatusFileSize
new4.62 KB

I did another rebase for the #7 patch.
Please, review it.

ramonvasconcelos’s picture

Assigned: ramonvasconcelos » Unassigned
alexanderj’s picture

Assigned: Unassigned » alexanderj

I will review this.

alexanderj’s picture

Assigned: alexanderj » Unassigned
Status: Needs review » Reviewed & tested by the community

I reviewed the patch and everything was fixed and working correctly.
Moving it to RTBC.

damienmckenna’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the reroll and review. However, this removes the option to send an email on success, so needs a little further work so that both options are available.

ramonvasconcelos’s picture

Assigned: Unassigned » ramonvasconcelos

Okay, i can take a look again.

ramonvasconcelos’s picture

Assigned: ramonvasconcelos » Unassigned
Status: Needs work » Needs review

I added the Success Email option again.
I suppose everything proposed by the issue is done. Please, review it.

When testing i realized something else tho. The default value for the Email Address for Success Notices and Email Address for Failure Notices fields is the Drupal System Site Email but when i change it to something different and save the value doesn't change after reloading the page. After more tests i saw that the correct value is being saved at the database, but is not being recovered to the frontend. Do you guys think we should correct this on this issue or open another one?

alexanderj’s picture

Assigned: Unassigned » alexanderj

I will review again.

alexanderj’s picture

Assigned: alexanderj » Unassigned

I reviewed the changes related to what was proposed in the issue and it's ok for me.

Regarding your second question, I don't know if this approach should be done here or in another task, I believe that the opinion of another members of the community is necessary.

pflora’s picture

Status: Needs review » Reviewed & tested by the community

I find the problem brought up by #23 to be out of the scope of this issue. Since #25 reviewd the changes and it seems to be working as intended, i'm moving it to RTBC.

solideogloria’s picture

If this gets committed, make sure to review #23 and open a new issue if needed.

damienmckenna’s picture

Status: Reviewed & tested by the community » Needs work

hook_update() needs to be fixed, it still only supports $key=="backup_failed" and doesn't support the "backup_success" option.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new5.07 KB

I missed that the MR resolved some problems from the patch. So here's the MR in patch format.

damienmckenna’s picture

Some streamlining of the method names.

  • DamienMcKenna committed 2fb5168 on 5.1.x
    Issue #3133933 by DamienMcKenna, ramonvasconcelos, larisse, paulocs,...
damienmckenna’s picture

Status: Needs review » Fixed

Committed. Any improvements can be done in separate issues. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.