Bug 9326

Summary: New database update system suggests running duplicate updates
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: Installation and upgrade (web-based installer)Assignee: Jonathan Druart <jonathan.druart>
Status: CLOSED WONTFIX QA Contact:
Severity: new feature    
Priority: P5 - low CC: gitbot, gmcharlt, jonathan.druart, m.de.rooy, mjr, paul.poulain
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7167    
Bug Blocks:    
Attachments: Bug 9326, 7167: Add a "execute anyway" link for versions already executed

Description Jared Camins-Esakov 2012-12-27 16:54:54 UTC
When an update has been renamed, the new database update system suggests running the duplicate update, even though when you tell it to go ahead and do that, it informs you that it is a duplicate update.
Comment 1 Jonathan Druart 2012-12-28 11:33:21 UTC
I understand what we discuss yesterday :)

It is the normal behavior:
A new version is available, you execute it.
This version is an already executed file (same md5) so you must mark it as "ok" .
The execute routine checks the md5 before any operation and returns this error if the same md5 already exists in DB.

It is not a bug for me.

What do you propose? Do you have a better way to manage this kind of files?
Comment 2 Jared Camins-Esakov 2012-12-28 12:21:31 UTC
(In reply to comment #1)
> I understand what we discuss yesterday :)
> 
> It is the normal behavior:
> A new version is available, you execute it.
> This version is an already executed file (same md5) so you must mark it as
> "ok" .
> The execute routine checks the md5 before any operation and returns this
> error if the same md5 already exists in DB.
> 
> It is not a bug for me.
> 
> What do you propose? Do you have a better way to manage this kind of files?

Since it is impossible to rerun the update even if you want to, the MD5 needs to be checked prior to deciding that there are database updates to run.
Comment 3 Jonathan Druart 2012-12-28 14:29:48 UTC
It would be possible to let the user choose what to do:
 "version xxx already executed in version yyy, [mark as OK] or [apply anyway]"
Comment 4 Jonathan Druart 2013-01-03 13:28:34 UTC
Created attachment 14391 [details] [review]
Bug 9326, 7167: Add a "execute anyway" link for versions already executed

If a version has the same md5 than an version already executed, a link
allows the administrator to execute this version anyway.
Comment 5 MJ Ray (software.coop) 2013-02-28 16:48:19 UTC
Applying: Bug 9326, 7167: Add a "execute anyway" link for versions already executed
error: C4/Update/Database.pm: does not exist in index
error: admin/updatedatabase.pl: does not exist in index
error: koha-tmpl/intranet-tmpl/prog/en/modules/admin/updatedatabase.tt: does not exist in index
Patch failed at 0001 Bug 9326, 7167: Add a "execute anyway" link for versions already executed
Comment 6 Jonathan Druart 2013-02-28 19:15:25 UTC
This development depends on bug 7167
Comment 7 MJ Ray (software.coop) 2013-03-01 14:01:37 UTC
Downgrading to the same status as 7167 until 7167 is pushed, because this is not blocking the release.
Comment 8 I'm just a bot 2013-09-18 10:41:00 UTC
Applying: Bug 9326, 7167: Add a "execute anyway" link for versions already executed
Using index info to reconstruct a base tree...
A	C4/Update/Database.pm
A	admin/updatedatabase.pl
A	koha-tmpl/intranet-tmpl/prog/en/modules/admin/updatedatabase.tt
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): koha-tmpl/intranet-tmpl/prog/en/modules/admin/updatedatabase.tt deleted in HEAD and modified in Bug 9326, 7167: Add a "execute anyway" link for versions already executed. Version Bug 9326, 7167: Add a "execute anyway" link for versions already executed of koha-tmpl/intranet-tmpl/prog/en/modules/admin/updatedatabase.tt left in tree.
CONFLICT (modify/delete): admin/updatedatabase.pl deleted in HEAD and modified in Bug 9326, 7167: Add a "execute anyway" link for versions already executed. Version Bug 9326, 7167: Add a "execute anyway" link for versions already executed of admin/updatedatabase.pl left in tree.
CONFLICT (modify/delete): C4/Update/Database.pm deleted in HEAD and modified in Bug 9326, 7167: Add a "execute anyway" link for versions already executed. Version Bug 9326, 7167: Add a "execute anyway" link for versions already executed of C4/Update/Database.pm left in tree.
Patch failed at 0001 Bug 9326, 7167: Add a "execute anyway" link for versions already executed
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 9 Jonathan Druart 2013-09-18 11:42:01 UTC
(In reply to I'm just a bot from comment #8)
This development depends on bug 7167
Comment 10 I'm just a bot 2013-09-29 06:02:10 UTC
This bug depends on 7167 which has no valid patches