Bug 18672 - Creation Date and Modification Date are the same for a list in the Lists Module
Summary: Creation Date and Modification Date are the same for a list in the Lists Module
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-25 19:44 UTC by Karen
Modified: 2017-07-18 14:55 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Creation Date and Modification Date are the same for a list in the Lists Module (173.50 KB, image/png)
2017-05-25 19:44 UTC, Karen
Details
Bug 18672 - Fix overwriting creation date with modification date when editing list (1.41 KB, patch)
2017-05-29 07:00 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18672: Test for fixing overwriting creation date (1.67 KB, patch)
2017-05-29 08:21 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18672 (1.80 KB, patch)
2017-06-06 15:57 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18672: Fix overwriting creation date with modification date when editing list (1.55 KB, patch)
2017-06-23 10:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18672: Test for fixing overwriting creation date (1.93 KB, patch)
2017-06-23 10:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18672: [QA Follow-up] Simplify without sleep (1.79 KB, patch)
2017-06-23 10:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18672: Fix overwriting creation date with modification date when editing list (1.50 KB, patch)
2017-07-11 11:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18672: Test for fixing overwriting creation date (1.94 KB, patch)
2017-07-11 11:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18672: [QA Follow-up] Simplify without sleep (1.80 KB, patch)
2017-07-11 11:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Karen 2017-05-25 19:44:45 UTC
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.
Comment 1 Marc Véron 2017-05-29 06:33:14 UTC
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)
Comment 2 Marc Véron 2017-05-29 07:00:35 UTC
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
Comment 3 Marc Véron 2017-05-29 08:21:46 UTC
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
Comment 4 Lee Jamison 2017-06-05 18:27:27 UTC
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
Comment 5 Lee Jamison 2017-06-05 19:44:17 UTC
The XSLT turned out to be a problem on my machine regarding singleBranchMode. Everything looks good now so will sign off.
Comment 6 Lee Jamison 2017-06-06 15:57:38 UTC
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 7 Marcel de Rooy 2017-06-23 10:15:21 UTC
Comment on attachment 63781 [details] [review]
Bug 18672 - Fix overwriting creation date with modification date when editing list

Incorrectly obsoleted as it seems
Comment 8 Marcel de Rooy 2017-06-23 10:36:50 UTC
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>
Comment 9 Marcel de Rooy 2017-06-23 10:36:55 UTC
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>
Comment 10 Marcel de Rooy 2017-06-23 10:37:00 UTC
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>
Comment 11 Jonathan Druart 2017-07-10 20:37:04 UTC
Please rebase on top of bug 18228.
Comment 12 Marcel de Rooy 2017-07-11 11:55:24 UTC
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>
Comment 13 Marcel de Rooy 2017-07-11 11:55:29 UTC
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>
Comment 14 Marcel de Rooy 2017-07-11 11:55:33 UTC
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>
Comment 15 Jonathan Druart 2017-07-17 19:12:53 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 16 Fridolin SOMERS 2017-07-18 14:55:30 UTC
Enhancement not pushed to 17.05.x