Created attachment 63720 [details] Creation Date and Modification Date are the same for a list in the Lists Module In the Lists Module the creation date and the modification date show the same date for each list. The expected behavior is that the creation date would be the date that the list was created and the modification date would be the last date that any changes were made.
Confirmed on current master. The error occurs when a list is edited. To reproduce: - In staff client, create a new list (if you have not already one) - In db, update virtualshelves and set field created_on to an earlier date, something like: update virtualshelves set created_on = '2017-04-01 02:09:12' where shelfnumber = 1; - Go to Home > Lists > Your lists - Verify that the modified creation date for this list appears in staff client - Edit list in staff client, save - Verify that creation date is overwritten by modification date (wrong)
Created attachment 63781 [details] [review] Bug 18672 - Fix overwriting creation date with modification date when editing list To reproduce: - In staff client, create a new list (if you have not already one) - In db, update virtualshelves and set field created_on to an earlier date, something like: update virtualshelves set created_on = '2017-04-01 02:09:12' where shelfnumber = 1; - Go to Home > Lists > Your lists - Verify that the modified creation date for this list appears in staff client - Edit list in staff client, save - Verify that creation date is overwritten by modification date (wrong) To test: - Apply patch - Repeat steps above, verify that creation date no longer is overwritten by modification date
Created attachment 63782 [details] [review] Bug 18672: Test for fixing overwriting creation date Use this test to highlight issue: prove -v t/db_dependent/Virtualshelves.t After applying patch for Koha/Virtualshelf.pm it should turn green
Marc, while testing, QA tools passes without a problem but I've tried repeated unit tests against your patch but they all seem to fail with the following: t/XSLT.t ............................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/10 subtests t/dummy.t ........................... ok Test Summary Report ------------------- t/XSLT.t (Wstat: 256 Tests: 10 Failed: 1) Failed test: 10 Non-zero exit status: 1
The XSLT turned out to be a problem on my machine regarding singleBranchMode. Everything looks good now so will sign off.
Created attachment 64063 [details] [review] [SIGNED OFF] Bug 18672 Use this test to highlight issue: prove -v t/db_dependent/Virtualshelves.t After applying patch for Koha/Virtualshelf.pm it should turn green Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works correctly according to test case. Passes QA Tools and the indicated t/db_dependent/Virtualshelves.t unit test.
Comment on attachment 63781 [details] [review] Bug 18672 - Fix overwriting creation date with modification date when editing list Incorrectly obsoleted as it seems
Created attachment 64585 [details] [review] Bug 18672: Fix overwriting creation date with modification date when editing list To reproduce: - In staff client, create a new list (if you have not already one) - In db, update virtualshelves and set field created_on to an earlier date, something like: update virtualshelves set created_on = '2017-04-01 02:09:12' where shelfnumber = 1; - Go to Home > Lists > Your lists - Verify that the modified creation date for this list appears in staff client - Edit list in staff client, save - Verify that creation date is overwritten by modification date (wrong) To test: - Apply patch - Repeat steps above, verify that creation date no longer is overwritten by modification date Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64586 [details] [review] Bug 18672: Test for fixing overwriting creation date Use this test to highlight issue: prove -v t/db_dependent/Virtualshelves.t After applying patch for Koha/Virtualshelf.pm it should turn green Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works correctly according to test case. Passes QA Tools and the indicated t/db_dependent/Virtualshelves.t unit test. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64587 [details] [review] Bug 18672: [QA Follow-up] Simplify without sleep Set the creation date one hour back, store and check again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Please rebase on top of bug 18228.
Created attachment 64994 [details] [review] Bug 18672: Fix overwriting creation date with modification date when editing list To reproduce: - In staff client, create a new list (if you have not already one) - In db, update virtualshelves and set field created_on to an earlier date, something like: update virtualshelves set created_on = '2017-04-01 02:09:12' where shelfnumber = 1; - Go to Home > Lists > Your lists - Verify that the modified creation date for this list appears in staff client - Edit list in staff client, save - Verify that creation date is overwritten by modification date (wrong) To test: - Apply patch - Repeat steps above, verify that creation date no longer is overwritten by modification date Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64995 [details] [review] Bug 18672: Test for fixing overwriting creation date Use this test to highlight issue: prove -v t/db_dependent/Virtualshelves.t After applying patch for Koha/Virtualshelf.pm it should turn green Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works correctly according to test case. Passes QA Tools and the indicated t/db_dependent/Virtualshelves.t unit test. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64996 [details] [review] Bug 18672: [QA Follow-up] Simplify without sleep Set the creation date one hour back, store and check again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.11, thanks to everybody involved!
Enhancement not pushed to 17.05.x