[Bug 17976] New: TT syntax for notices - Add an equivalence for items.fine
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Bug ID: 17976 Summary: TT syntax for notices - Add an equivalence for items.fine Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org The items.fine is a trick of our historical syntax. We need to provide a way to access this value from the a notice template using the TT syntax. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17967 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Depends on| |14757 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14757 [Bug 14757] Allow the use of Template Toolkit syntax for slips and notices -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22421 CC| |martin.renvoize@ptfs-europe | |.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22421 [Bug 22421] accountlines.issue_id is missing a foreign key constraint -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- [% checkout.overdue_fine.amount | $Price %] feels like the 'right' syntax for this to me.. problem is, half the relations don't exist yet to do that.. and worse still we've not got the constraints either. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- [% checkout.overdue_fine.amount | $Price %] would work for me - I imagine overdue_fine could be used to pull other values from the account line? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36109 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36109 [Bug 36109] Port default ODUE notice to Template Toolkit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36110 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36110 [Bug 36110] Port default OVERDUES_SLIP to Template Toolkit syntax -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172277&action=edit Bug 17976: Update test to include fines This patch updates the existing test to include checking the alternative to items.fine syntax. We could use the account_lines relation, however that would include other charges linked to the checkout, for example rental charges. I opt to add a new accessor to give us more options and refine to just overdue fines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172278 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172278&action=edit Bug 17976: Add overdue_fines accessor to Koha::Checkout This patch adds a new filtered relation accessor to the Koha::Checkout object to return just overdue fine type account lines related to the checkout. Whilst this is easy to chain in code, it's not available via TT and so this accessor is useful for the notices case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |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=17976 Martin Renvoize (ashimema) <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=17976 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Unit test inbound -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172283&action=edit Bug 17976: Unit tests Add unit tests for the newly introduced overdue fines relation accessor. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- This is mostly behind the scenes stuff.. i.e the test plan is to run the included unit tests. The real benefit will be for bug 36109 where I intend to add a new sample notice for ODUE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Ray Delahunty <r.delahunty@arts.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.delahunty@arts.ac.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172277|0 |1 is obsolete| | --- Comment #8 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 172304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172304&action=edit Bug 17976: Update test to include fines This patch updates the existing test to include checking the alternative to items.fine syntax. We could use the account_lines relation, however that would include other charges linked to the checkout, for example rental charges. I opt to add a new accessor to give us more options and refine to just overdue fines. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172278|0 |1 is obsolete| | --- Comment #9 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 172305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172305&action=edit Bug 17976: Add overdue_fines accessor to Koha::Checkout This patch adds a new filtered relation accessor to the Koha::Checkout object to return just overdue fine type account lines related to the checkout. Whilst this is easy to chain in code, it's not available via TT and so this accessor is useful for the notices case. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172283|0 |1 is obsolete| | --- Comment #10 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 172306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172306&action=edit Bug 17976: Unit tests Add unit tests for the newly introduced overdue fines relation accessor. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov Status|Needs Signoff |Signed Off --- Comment #11 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- This is great, thanks Martin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Kyle M Hall (khall) <kyle@bywatersolutions.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=17976 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172304|0 |1 is obsolete| | Attachment #172305|0 |1 is obsolete| | Attachment #172306|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172328&action=edit Bug 17976: Update test to include fines This patch updates the existing test to include checking the alternative to items.fine syntax. We could use the account_lines relation, however that would include other charges linked to the checkout, for example rental charges. I opt to add a new accessor to give us more options and refine to just overdue fines. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> 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=17976 --- Comment #13 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172329&action=edit Bug 17976: Add overdue_fines accessor to Koha::Checkout This patch adds a new filtered relation accessor to the Koha::Checkout object to return just overdue fine type account lines related to the checkout. Whilst this is easy to chain in code, it's not available via TT and so this accessor is useful for the notices case. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> 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=17976 --- Comment #14 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172330&action=edit Bug 17976: Unit tests Add unit tests for the newly introduced overdue fines relation accessor. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> 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=17976 --- Comment #15 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172331&action=edit Bug 17976: (QA follow-up) Tidy code 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=17976 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- PQA but blocked by 22421 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.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=17976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_11_candidate Status|Passed QA |BLOCKED --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'd really really like to have this. Can we resolve the FQA on the dependent bug 22421 somehow? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #17)
I'd really really like to have this.
Can we resolve the FQA on the dependent bug 22421 somehow?
I have 22421 on my branch, but have trouble with the Tidy Code patch from Kyle giving me an sha1 error. I will leave it out for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch adds an easy release notes| |accessor method for | |fetching a checkouts | |overdue fines. This is of | |particular interest to | |notice template authors as | |you can now use the | |following snippet in your | |notices: | | | |`[% | |overdue.overdue_fines.total | |_outstanding | $Price %]` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #20 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174324&action=edit Bug 17976: (QA follow-up) Add missing transaction rollback We were missing the transaction wrapper for the overdue_fines test added in this patchset. This caused problems in subsequent tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Follow-up picked for main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Notices |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17976 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |lucas@bywatersolutions.com --- Comment #22 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 24.05.x backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org