[Bug 36654] New: Add template toolkit function to get arbitrary Koha::Objects
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Bug ID: 36654 Summary: Add template toolkit function to get arbitrary Koha::Objects Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org A lot of older notice data includes ids but not the objects themselves. We should have a helper TT plugin to make getting those objects easy. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |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=36654 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- In particular, the data for overdues is difficult to access. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Kyle M Hall <kyle@bywatersolutions.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=36654 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 165227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165227&action=edit Bug 36654: Add template toolkit function to get arbitrary Koha::Objects A lot of older notice data include identifiers but not the objects themselves. We should have a helper TT plugin to make getting those objects easy. Test Plan: 1) prove t/db_dependent/Koha/Template/Plugin/Koha.t 2) Set the CHECKOUT notice to: [% USE Koha %] [% SET b = Koha.GetObjectById('Koha::Biblios', b.biblionumber ); [% b.title %] 3) Note the notice contains the checkout title -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36654 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.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=36654 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165227|0 |1 is obsolete| | --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166293&action=edit Bug 36654: Add template toolkit function to get arbitrary Koha::Objects A lot of older notice data include identifiers but not the objects themselves. We should have a helper TT plugin to make getting those objects easy. Test Plan: 1) prove t/db_dependent/Koha/Template/Plugin/Koha.t 2) Set the CHECKOUT notice to: [% USE Koha %] [% SET b = Koha.GetObjectById('Koha::Biblios', bblio.biblionumber ); %] [% b.title %] 3) Note the notice contains the checkout title Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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=36654 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166293|0 |1 is obsolete| | --- Comment #4 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166294&action=edit Bug 36654: Add template toolkit function to get arbitrary Koha::Objects A lot of older notice data include identifiers but not the objects themselves. We should have a helper TT plugin to make getting those objects easy. Test Plan: 1) prove t/db_dependent/Koha/Template/Plugin/Koha.t 2) Set the CHECKOUT notice to: [% USE Koha %] [% SET b = Koha.GetObjectById('Koha::Biblios', biblio.biblionumber ); %] [% b.title %] 3) Note the notice contains the checkout title Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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=36654 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- I think this has security implications as anyone with "edit_notices" permission could fetch any object from the database. In the CHECKOUT notice the biblio object is available so the example given could be rewritten simply as: [% biblio.title %] Can you provide another example where GetObjectById would be required ? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org