Main Koha release repository https://koha-community.org
Find a file
Marion Durand 9aa9608013 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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-12-15 12:14:47 -10:00
acqui Bug 29283: (QA follow-up) Remove code duplication 2021-11-02 14:57:09 +01:00
admin Bug 29040: Remove warning from the itemtype edit view 2021-12-15 12:14:26 -10:00
api
authorities
basket
bin Bug 20582: Turn Koha into a Mojolicious application 2020-10-06 12:00:04 +02:00
C4 Bug 28855: Purging suggestions test should not be on timestamp 2021-12-15 12:14:47 -10:00
catalogue
cataloguing Bug 29437: (QA follow-up) Remove Business::ISBN from addbooks 2021-11-19 15:23:27 +01:00
circ
clubs
course_reserves
debian
docs 21.11.00 - Update history.txt 2021-11-26 12:26:22 +01:00
errors
etc
ill Bug 22614: Migrate original request 2021-09-21 20:22:57 +02:00
installer Bug 13188: DBRev 21.12.00.002 2021-12-14 09:48:51 -10:00
Koha Bug 29403: Match the whole string 2021-12-15 12:14:41 -10:00
koha-tmpl Bug 13188: (QA follow-up) Enhance list of field exclusions 2021-12-14 09:46:22 -10:00
labels
lib/CGI/Session/Serialize
members
misc
offline_circ
opac Bug 13188: Add PatronSelfModificationMandatoryField system preference 2021-12-14 09:46:22 -10:00
patron_lists
patroncards
plugins
pos
reports Bug 28216: Fix vendor list group by in serials statistics wizard 2021-12-14 09:38:10 -10:00
reserve Bug 29115: Fix syntax errors in club hold functionality 2021-12-10 21:33:17 -10:00
reviews Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
rotating_collections
serials
services
skel
suggestion Bug 24370: Allow resetting library to ANY 2021-11-02 14:57:04 +01:00
svc
t Bug 29403: Fix api/v1/patrons.t 2021-12-15 12:14:45 -10:00
tags
tmp/modified_authorities
tools Bug 9565: Use Koha::Biblio 2021-12-10 21:15:30 -10:00
virtualshelves Bug 28959: Fix other cases 2021-10-28 17:47:38 +02:00
xt
.editorconfig
.eslintrc.json
.gitignore
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap
.perlcriticrc
.proverc.dist
.scss-lint.yml
about.pl
app.psgi
changelanguage.pl
cpanfile
fix-perl-path.PL
gulpfile.js
help.pl
INSTALL
Koha.pm Bug 13188: DBRev 21.12.00.002 2021-12-14 09:48:51 -10:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL
MANIFEST.SKIP
package.json
README
README.md Bug 27092: Remove note about "synced repo" from README.md 2020-11-25 16:31:58 +01:00
README.robots
rewrite-config.PL
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo