Problem/Motivation

When doing restores again and again (for testing/dev purposes), it would help a lot to show when the restore / backup was successfull (current date & time) in the statusmessage.

So I can see when I last ran the backup, especially it takes a longer amount of time and I don't watch the process.

Steps to reproduce

Proposed resolution

Add date & time behind statusmessage on success.

Remaining tasks

* Remove the changes to the tests.
* Update the wording to say "Backup completed at []".
* Update the date output to use the system APIs so the date is in the correct format.

User interface changes

API changes

Data model changes

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:

Tag1 supports Drupal development!Tag1 logo

Comments

Anybody created an issue. See original summary.

Anybody’s picture

Issue summary: View changes
hmendes’s picture

Status: Active » Needs review
FileSize
1.25 KB

Something like this?
"Restore Complete at 02-03-2022 10:46"

The patch changes the message to be this way, but i can change it to another format as well...

andregp’s picture

Status: Needs review » Needs work
FileSize
124.17 KB
98.05 KB

Hi @hmendes, your patch applies flawlessly and successfully update the "Restore Complete" message :)
But, the "Backup Complete" wasn't updated.

Also, I believe changing "Complete" to "Completed" since the addition of 'at' would be better.

DamienMcKenna’s picture

The test won't pass as the timestamp between when the backup starts and the test runs will be slightly different, so it'd be best to just check for the string without the timestamp.

DamienMcKenna’s picture

Issue summary: View changes

I also think it should use the core APIs to use the correct timestamp format rather than hardcoding it to a specific format.

Anybody’s picture

+1 for #6, thank you @Damien! And of course all who help here :)

Anybody’s picture

@hmendes, would you like to do the final fixes mentioned in #6?

WagnerMelo’s picture

Assigned: Unassigned » WagnerMelo

Hi, i'll try solve the implementation mentioned at #6

WagnerMelo’s picture

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

Hi, i made the changes that was requested by the maintainer, to implementing a Date API.
I tested the implementation change the timezone to aleatory timezones to see if the behavior was the expected, and it worked normaly.
And i create another branch cause i had some problems to make the merge request on the other branch, so i'll move this issue to needs review.

bruno.bicudo’s picture

Assigned: Unassigned » bruno.bicudo

I'll review this one :)

bruno.bicudo’s picture

Assigned: bruno.bicudo » Unassigned
Status: Needs review » Reviewed & tested by the community

I reviewed this one and it woks as described by @WagnerMelo on #12.

All tests passed and manual testing didn't return any errors too.

Moving to RTBC.

DamienMcKenna’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
Parent issue: » #3223059: Plan for Backup and Migrate 5.1.0

This still needs to use the Drupal APIs to format the timestamp instead of hardcoding a format.

Anybody’s picture

Version: 5.0.x-dev » 5.1.x-dev
Status: Needs work » Needs review

I agree, here we go @Damien :)

I chose 'long' as I think all details are helpful.
Is 5.0.x still in active development or should this go into 5.1.x?

Grevil made their first commit to this issue’s fork.

Grevil’s picture

Status: Needs review » Reviewed & tested by the community

Works as expected! I just added a small addition to change "complete" to "completed" as @andregp already suggested in #4.

I also found out, that the restoration message gets logged first, and then the restoration resets the recent log messages. I created a separate issue for this, since it is unrelated. #3305094: Log "backup restored" to watchdog after restore finished

  • DamienMcKenna committed aacec07 on 5.1.x
    Issue #3262070 by WagnerMelo, Anybody, Grevil, hmendes, andregp,...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Great work! Thanks everyone.

Committed!

Status: Fixed » Closed (fixed)

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