[Koha-bugs] [Bug 15563] Add option to regularly delete patroncard and label batches to cleanup_database.pl cronjob

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 22 13:23:23 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15563

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #13 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Hi Andrew,

(In reply to Andrew Fuerste-Henry from comment #3)
> Deleting batches is complicated a bit by the table structure. There's no
> table for batches, it's just a column in the table that holds the individual
> items. So there's no timestamp for a given batch, just a bunch of timestamps
> for individual items. I've sidestepped that by deleting items rather than
> batches. If all items in a given batch are gone, the batch is gone. This
> does mean you could have a batch where items were added at different times
> and therefore part of the batch is deleted and part remains.

I understand the issue - that's complicating things. May I make a suggestion
for a slightly different approach?

We could delete batches that have not been changed in x days instead, by using
something like:

SELECT batch_id from creator_batches WHERE MAX(timestamp) ... (older than x
days)
GROUP BY batch_id;

And then DELETE all the entries with the batch_ids of our result set.

What do you think? I am feeling a bit uneasy about the possibility that the
batches will keep 'changing' in the GUI in number and what's in them. It would
feel a bit more consistent to me to delete the whole thing or not.

Otherwise I had a bit of trouble understanding the wording of the new options.
Could you maybe try and clear that up a bit?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list