[Bug 28855] New: Purging Suggestions test should not being on timestamp
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Bug ID: 28855 Summary: Purging Suggestions test should not being on timestamp Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Acquisitions Assignee: didier.gautheron@biblibre.com Reporter: didier.gautheron@biblibre.com QA Contact: testopia@bugs.koha-community.org Depends on: 28408, 23590 Hi, DelSuggestionsOlderThan is on 'date', a timestamp, which is rather unreliable for that kind of stuff. eg: 'date' field is trashed by #23590 updatedatabase.pl , (which could use date=date in SET BTW) Maybe it could use lastmodificationdate ? Note: to some extend it's a RGPD issue. Regards Didier Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23590 [Bug 23590] Add the ability to change the manager of a suggestion and notify the new manager https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28408 [Bug 28408] Last modification date for suggestions is wrong -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Bug 28855 depends on bug 28408, which changed state. Bug 28408 Summary: Last modification date for suggestions is wrong https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28408 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 marion.durand@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marion.durand@biblibre.com --- Comment #1 from marion.durand@biblibre.com --- Hi ! I'm not sure we can use lastmodificationdate. If we want to use lastmodificationdate, I think we have to initialise it with the suggestion date when creating a new suggestion It is currently initialised to NULL. So all suggestions that have never been modified will never be deleted. I'm not sure what to do for the existing suggestion that have not been modified yet (and so lastmodificationdate is still NULL) Another option would be to use suggesteddate that is always initialised with a date. Regards, Marion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #2 from marion.durand@biblibre.com --- Created attachment 127482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127482&action=edit Bug 28855: Purging suggestions test should not be on timestamp DelSuggestionsOlderThan is on "date", a timestamp. It can be a problem because "date" is updated when we update the database, in consequences all the suggestions take the same date. This patch use 'manageddate' instead. In order to test this patch, you will need to have some suggestions where "Managed on" (suggestions.manageddate in the database) is older from "Last updated" (suggestions.date in the database). This can append during some specific update. If you don't have such data, you will have to add them via SQL request. Example of sql for insertion (ID is the patron id of a librarian which can manage suggestions): INSERT INTO suggestions (suggestedby, suggesteddate, managedby, manageddate, acceptedby, accepteddate, STATUS, title) VALUES (1, '2020-10-13', 1, '2020-10-26', 1, '2020-10-26', 'ACCEPTED', 'title'); Test plan: 1- Choose a date and find (or add) a suggestion where: - "Last updated" is not older than this date - "Managed on" is older than this date - "Status" is different from "Pending" ("ASKED" in database) Calculate number_days = today's date - chosen date Example: (Today's date 28/10/2021, chosen date : 28/10/2020, number_days=365) Suggestion | .. | Managed on | .. | Last updated | .. | Status title | .. | 10/26/2020 | .. | 05/15/2021 | .. | Accepted 2- Run cron job /home/koha/src/misc/cronjobs/purge_suggestions.pl --confirm --days number_days 3- Check that this suggestion has not been deleted 4- Apply the patch 5- Repeat steps 1 and 2 6- Check that this suggestion has been deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #3 from marion.durand@biblibre.com --- Created attachment 127483 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127483&action=edit Bug 28855: (follow-up) adapt specific test Adapt the test of function DelSuggestionsOlderThan to match the new behaviour of the function. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 marion.durand@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 marion.durand@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|didier.gautheron@biblibre.c |marion.durand@biblibre.com |om | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127482|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 128411 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128411&action=edit Bug 28855: Purging suggestions test should not be on timestamp DelSuggestionsOlderThan is on "date", a timestamp. It can be a problem because "date" is updated when we update the database, in consequences all the suggestions take the same date. This patch use 'manageddate' instead. In order to test this patch, you will need to have some suggestions where "Managed on" (suggestions.manageddate in the database) is older from "Last updated" (suggestions.date in the database). This can append during some specific update. If you don't have such data, you will have to add them via SQL request. Example of sql for insertion (ID is the patron id of a librarian which can manage suggestions): INSERT INTO suggestions (suggestedby, suggesteddate, managedby, manageddate, acceptedby, accepteddate, STATUS, title) VALUES (1, '2020-10-13', 1, '2020-10-26', 1, '2020-10-26', 'ACCEPTED', 'title'); Test plan: 1- Choose a date and find (or add) a suggestion where: - "Last updated" is not older than this date - "Managed on" is older than this date - "Status" is different from "Pending" ("ASKED" in database) Calculate number_days = today's date - chosen date Example: (Today's date 28/10/2021, chosen date : 28/10/2020, number_days=365) Suggestion | .. | Managed on | .. | Last updated | .. | Status title | .. | 10/26/2020 | .. | 05/15/2021 | .. | Accepted 2- Run cron job /home/koha/src/misc/cronjobs/purge_suggestions.pl --confirm --days number_days 3- Check that this suggestion has not been deleted 4- Apply the patch 5- Repeat steps 1 and 2 6- Check that this suggestion has been deleted Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127483|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 128412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128412&action=edit Bug 28855: (follow-up) adapt specific test Adapt the test of function DelSuggestionsOlderThan to match the new behaviour of the function. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This changes the date field release notes| |that cronjob | |misc/cronjobs/purge_suggest | |ions.pl uses to calculate | |the number of days for | |deleting accepted or | |rejected suggestions. It | |now uses the managed on | |date, as the last updated | |date that was used can be | |changed by other database | |updates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #6 from David Nind <david@davidnind.com> --- I reviewed the manual to see whether any changes are required - no change as required as it doesn't mention how the date is calculated (see acquisitions > suggestions section, acquisition system preferences > PurgeSuggestionsOlderThan, and cron jobs > clean up old suggestions). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |jonathan.druart+koha@gmail. | |com --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Andrew, does this make sense to you? It does to me but I would prefer to get your feedback on it before flagging it as PQA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Makes sense to me! Thanks, all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128411|0 |1 is obsolete| | Attachment #128412|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128464&action=edit Bug 28855: Purging suggestions test should not be on timestamp DelSuggestionsOlderThan is on "date", a timestamp. It can be a problem because "date" is updated when we update the database, in consequences all the suggestions take the same date. This patch use 'manageddate' instead. In order to test this patch, you will need to have some suggestions where "Managed on" (suggestions.manageddate in the database) is older from "Last updated" (suggestions.date in the database). This can append during some specific update. If you don't have such data, you will have to add them via SQL request. Example of sql for insertion (ID is the patron id of a librarian which can manage suggestions): INSERT INTO suggestions (suggestedby, suggesteddate, managedby, manageddate, acceptedby, accepteddate, STATUS, title) VALUES (1, '2020-10-13', 1, '2020-10-26', 1, '2020-10-26', 'ACCEPTED', 'title'); Test plan: 1- Choose a date and find (or add) a suggestion where: - "Last updated" is not older than this date - "Managed on" is older than this date - "Status" is different from "Pending" ("ASKED" in database) Calculate number_days = today's date - chosen date Example: (Today's date 28/10/2021, chosen date : 28/10/2020, number_days=365) Suggestion | .. | Managed on | .. | Last updated | .. | Status title | .. | 10/26/2020 | .. | 05/15/2021 | .. | Accepted 2- Run cron job /home/koha/src/misc/cronjobs/purge_suggestions.pl --confirm --days number_days 3- Check that this suggestion has not been deleted 4- Apply the patch 5- Repeat steps 1 and 2 6- Check that this suggestion has been deleted Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128465&action=edit Bug 28855: (follow-up) adapt specific test Adapt the test of function DelSuggestionsOlderThan to match the new behaviour of the function. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.01 released in| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.01 |22.05.00,21.11.01,21.05.08 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Purging Suggestions test |Purging suggestions test |should not being on |should not be on timestamp |timestamp | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28855 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org