[Bug 22593] New: Scripts dealing with accountlines need updating for bug 22008
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Bug ID: 22593 Summary: Scripts dealing with accountlines need updating for bug 22008 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Target Milestone: --- Currently we use 0 to indicate an action performed by command line scripts (userenv is undef, default to 0) After bug 22008 we must have a real borrowernumber. If we simply default to 'NULL' we will no longer be able to differentiate fines from command line from those of deleted users -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22008 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22008 [Bug 22008] accountlines.manager_id is missing a foreign key constraint -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22577 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22577 [Bug 22577] Cronjobs (and other scripts) should be attributed to a 'real' user -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |julian.maurice@biblibre.com | |, katrin.fischer@bsz-bw.de, | |kyle@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Scripts dealing with |Cronjobs/Scripts dealing |accountlines need updating |with accountlines need |for bug 22008 |updating for bug 22008 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 87069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87069&action=edit Bug 22593: Fix bad ternaries after bug 22008 A series of ternaries were introduced when we moved to add_debit which defaulted to 'user 0' should a userenv not be set. This was incorrect as userenv may well not be set (during cronscript runs for example) and the new constraint would not allow such a default. We switch to 'undef' here to satisfy the constraint. Test plan 1) Ensure you have data in your system that would be caught by the longoverdues cronjob. 2) Ensure you're sysprefs are setup to charge for lost items 3) Run the script and varify it runs to completion without errors Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.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=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14825 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #0)
Currently we use 0 to indicate an action performed by command line scripts (userenv is undef, default to 0)
After bug 22008 we must have a real borrowernumber.
If we simply default to 'NULL' we will no longer be able to differentiate fines from command line from those of deleted users
I believe that we can differentiate deleted users from cron users by the branchcode of the accountline - branch should remain for deleted user - I think if we deleted a branch we would want to delete the accountlines instead of NULL them also, but that is for elsewhere -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Kyle M Hall <kyle@bywatersolutions.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=22593 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87069|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 87075 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87075&action=edit Bug 22593: Fix bad ternaries after bug 22008 A series of ternaries were introduced when we moved to add_debit which defaulted to 'user 0' should a userenv not be set. This was incorrect as userenv may well not be set (during cronscript runs for example) and the new constraint would not allow such a default. We switch to 'undef' here to satisfy the constraint. Test plan 1) Ensure you have data in your system that would be caught by the longoverdues cronjob. 2) Ensure you're sysprefs are setup to charge for lost items 3) Run the script and varify it runs to completion without errors Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14825 |22518, 22512, 22547 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22512 [Bug 22512] accountlines.accountype mixes 'state' and 'type' https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22518 [Bug 22518] accounttype 'O' is still referred to but is never set https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22547 [Bug 22547] C4::Overdues - UpdateFine is barely tested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87075|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 87130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87130&action=edit Bug 22593: Fix bad ternaries after bug 22008 A series of ternaries were introduced when we moved to add_debit which defaulted to 'user 0' should a userenv not be set. This was incorrect as userenv may well not be set (during cronscript runs for example) and the new constraint would not allow such a default. We switch to 'undef' here to satisfy the constraint. Test plan 1) Ensure you have data in your system that would be caught by the longoverdues cronjob. 2) Ensure you're sysprefs are setup to charge for lost items 3) Run the script and varify it runs to completion without errors Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|22547 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22547 [Bug 22547] C4::Overdues - UpdateFine is barely tested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.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=22593 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|22512 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22512 [Bug 22512] accountlines.accountype mixes 'state' and 'type' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22593 Bug 22593 depends on bug 22008, which changed state. Bug 22008 Summary: accountlines.manager_id is missing a foreign key constraint https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22008 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |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=22593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Bug with enhancement not in 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org