Bug 34720

Summary: UpdateNotForLoanStatusOnCheckin should be named UpdateNotForLoanStatusOnCheckout
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Emmi Takkinen <emmi.takkinen>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: emmi.takkinen, fridolin.somers, jonathan.druart, m.de.rooy, matt.blenkinsop
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04
Circulation function:
Bug Depends on: 30403    
Bug Blocks: 34841    
Attachments: Bug 34720: Fix bug 30403 atomic updat
Bug 34720: Fix bug 30403 atomic update
Bug 34720: Say if syspref has been inserted
Bug 34720: Fix bug 30403 atomic update
Bug 34720: Say if syspref has been inserted

Description Kyle M Hall (khall) 2023-09-05 18:29:35 UTC
Bug 30403 creates the syspref UpdateNotForLoanStatusOnCheckin, but it should have created UpdateNotForLoanStatusOnCheckout.
Comment 1 Emmi Takkinen 2023-09-06 06:12:29 UTC
Bug 30403 _does_ create syspref UpdateNotForLoanStatusOnCheckout. It has same functionality as UpdateNotForLoanStatusOnCheckin (created in bug 11629) but for check outs. Hence the name.
Comment 2 Jonathan Druart 2023-09-20 12:02:34 UTC
Emmi, no, the atomic update is wrong:

+        $dbh->do(q{INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES ('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is check

Please fix ASAP.
Comment 3 Emmi Takkinen 2023-09-21 05:19:20 UTC
(In reply to Jonathan Druart from comment #2)
> Emmi, no, the atomic update is wrong:
> 
> +        $dbh->do(q{INSERT IGNORE INTO systempreferences ( variable, value,
> options, explanation, type ) VALUES ('UpdateNotForLoanStatusOnCheckin', '',
> 'NULL', 'This is a list of value pairs. When an item is check
> 
> Please fix ASAP.

I see. Should I create a new atomicupdate file or fix this into db_rev 221200018.pl?
Comment 4 Jonathan Druart 2023-09-21 06:51:39 UTC
(In reply to Emmi Takkinen from comment #3)
> (In reply to Jonathan Druart from comment #2)
> > Emmi, no, the atomic update is wrong:
> > 
> > +        $dbh->do(q{INSERT IGNORE INTO systempreferences ( variable, value,
> > options, explanation, type ) VALUES ('UpdateNotForLoanStatusOnCheckin', '',
> > 'NULL', 'This is a list of value pairs. When an item is check
> > 
> > Please fix ASAP.
> 
> I see. Should I create a new atomicupdate file or fix this into db_rev
> 221200018.pl?

Both.
Comment 5 Emmi Takkinen 2023-09-21 08:49:59 UTC
Created attachment 155968 [details] [review]
Bug 34720: Fix bug 30403 atomic updat

Bug 30403 had wrong syspref name in its
atomic update file. This patch fixes this in
db_rev 221200018.pl and adds new atomic
update file.
Comment 6 Emmi Takkinen 2023-09-21 08:51:19 UTC
Added patch, hopefully it's correct. If not, comment and I'll fix it.
Comment 7 Jonathan Druart 2023-09-22 06:31:37 UTC
Created attachment 156028 [details] [review]
Bug 34720: Fix bug 30403 atomic update

Bug 30403 had wrong syspref name in its
atomic update file. This patch fixes this in
db_rev 221200018.pl and adds new atomic
update file.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2023-09-22 06:31:40 UTC
Created attachment 156029 [details] [review]
Bug 34720: Say if syspref has been inserted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2023-09-22 06:33:04 UTC
Thanks, Emmi!
Comment 10 Marcel de Rooy 2023-09-22 07:48:22 UTC
Created attachment 156031 [details] [review]
Bug 34720: Fix bug 30403 atomic update

Bug 30403 had wrong syspref name in its
atomic update file. This patch fixes this in
db_rev 221200018.pl and adds new atomic
update file.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2023-09-22 07:48:25 UTC
Created attachment 156032 [details] [review]
Bug 34720: Say if syspref has been inserted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Tomás Cohen Arazi (tcohen) 2023-09-22 14:35:14 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 13 Fridolin Somers 2023-09-22 20:16:13 UTC
Pushed to 23.05.x for 23.05.04
Comment 14 Matt Blenkinsop 2023-10-17 16:24:13 UTC
Dependency missing for 22.11.x - not backporting