[Bug 11473] New: View log template has malformed conditionals, and logging info incorrect/inconsistent/unexpected
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Bug ID: 11473 Summary: View log template has malformed conditionals, and logging info incorrect/inconsistent/unexpected Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Transaction logs Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org 1) Malformed conditionals Currently, the majority of "viewlog.tt" is ignored, because we haven't formed the conditionals correctly. (e.g. Using 'module' when we should be using 'loopro.module' [or 'loopro.MODULENAME' like 'loopro.CIRCULATION'], 'info' instead of 'loopro.info', etc.) This means that we always get the raw "loopro.object", which is either a borrowernumber, biblionumber, itemnumber, subscriptionid, or authid, with absolutely no qualifier at all. *SOLUTION* Alas, the solution requires a few systematic changes. Detecting an object as a 'borrowernumber' is easy, since MEMBERS, CIRCULATION, and FINES always use it as its object. Same goes for 'subscriptionid' for SERIALS and 'authid' for AUTHORITIES. For these cases, we just need to fix the variables called in the conditions. However, unfortunately, CATALOGUING sometimes uses biblionumber and sometimes uses itemnumber as its object. This causes the following problem... 2) Conditions in viewlog.pl and viewlog.tt do not correctly differentiate items and biblios. There are conditions that check to see if the 'info' column says 'item'. However, this has erratic results, because 'item' is only logged for item adds and deletions - not modifications. (Authorities also only track 'authority' for additions and deletions - not modifications.) 'biblio' is only tracked for biblio additions. Deletions have no info, while modifications include the record content. In viewlog.tt, logs without an 'info' of 'item' will be labelled and linked as 'biblio'. That means that all item modifications will be treated as biblios and not items. *SOLUTION* Change logaction to prepend the info column with "biblio" for all biblio transactions and "item" for all item transactions. Then, check for the applicable substring in viewlog.pl and viewlog.tt to determine how to link and label the number. For legacy data, have a third option that doesn't label/link the object. Just have the raw number (as we currently do). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11477 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 23915 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23915&action=edit Bug 11473 - Fix log viewer template conditions This patch adds the 'loopro' key to the 'module' value, so that conditions are actually triggered in the template logic. (Note: loopro.CIRCULATION is valid, but I changed it for the sake of consistency across the different conditions.) This patch also adds substr checks to the 'info' column when using the cataloguing module. This will check for 'item' and 'biblio', so that the appropriate label qualifer can be shown in the log viewer. If either term is absent, the unqualified number will be shown instead (this will be the majority of action logs at this point). _TEST PLAN_ Before applying: 1) Access log viewer from Tools (or wherever really) 2) Look up logs for circulation, patrons, cataloguing, serial, authorities, etc. 3) Note that the "Object" will always just be a number without qualification. After applying the patch: 1) Look at those same logs 2) Note that the object number for borrowers will usually be prefaced by 'member' (notwithstanding FINES which aren't taken into account in this template yet); new bibs and new items should say 'Item X' or 'Biblio X'. Serials should have a link. Authorities should have a link and an 'auth' preface. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 23916 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23916&action=edit Bug 11473 - Remove boilerplate in log viewer template This patch eliminates unnecessary conditions and boilerplate. _TEST PLAN_ Apply the patch. 1) Try viewing logs for circulation, patrons, fines, cataloguines, serials, authorities, etc. 2) Note that everything should look exactly the same as before, with one exception: FINES 3) Fines will now show "member X" for the user associated with the fine. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Created attachment 23917 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23917&action=edit Bug 11473 - Improve wording in log viewer template This patch capitalizes 'member' and 'biblio' as object labels in the log viewer. It also adds a "Subscription" label, and changes "auth" to "Authority". _TEST PLAN_ Before applying patch: 1) View logs for patrons, new biblio, serials, and authorities. Apply the patch: 1) Notice the capitalization and new/modified labels. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 23918 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23918&action=edit Bug 11473 - add 'biblio' and 'item' to cataloguing logging info This patch adds the words 'biblio' and 'item' to the 'info' of the cataloguing logs which were missing them (such as biblio delete, biblio mod, item mod, upload cover image). This patch also adds 'authority' for authority mod. _TEST PLAN_ Before applying: 1) Create/view mods for items, biblios, and authorities. 2) Create/view biblio deletion 3) Create/view upload cover image log 4) Note that none of these contain the words 'biblio','item',or 'authority' in their "Info" columns. Apply patch. 5) Repeat steps 1-3 6) Note that the new logs contain 'biblio','item', and 'authority' in their "Info" column, while the past ones don't. 7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item' appear in their "Object" column for the new logs -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23915|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23922 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23922&action=edit Bug 11473 - Fix log viewer template conditions This patch adds the 'loopro' key to the 'module' value, so that conditions are actually triggered in the template logic. (Note: loopro.CIRCULATION is valid, but I changed it for the sake of consistency across the different conditions.) This patch also adds substr checks to the 'info' column when using the cataloguing module. This will check for 'item' and 'biblio', so that the appropriate label qualifer can be shown in the log viewer. If either term is absent, the unqualified number will be shown instead (this will be the majority of action logs at this point). _TEST PLAN_ Before applying: 1) Access log viewer from Tools (or wherever really) 2) Look up logs for circulation, patrons, cataloguing, serial, authorities, etc. 3) Note that the "Object" will always just be a number without qualification. After applying the patch: 1) Look at those same logs 2) Note that the object number for borrowers will usually be prefaced by 'member' (notwithstanding FINES which aren't taken into account in this template yet); new bibs and new items should say 'Item X' or 'Biblio X'. Serials should have a link. Authorities should have a link and an 'auth' preface. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23916|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23923 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23923&action=edit Bug 11473 - Remove boilerplate in log viewer template This patch eliminates unnecessary conditions and boilerplate. _TEST PLAN_ Apply the patch. 1) Try viewing logs for circulation, patrons, fines, cataloguines, serials, authorities, etc. 2) Note that everything should look exactly the same as before, with one exception: FINES 3) Fines will now show "member X" for the user associated with the fine. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23917|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23924 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23924&action=edit Bug 11473 - Improve wording in log viewer template This patch capitalizes 'member' and 'biblio' as object labels in the log viewer. It also adds a "Subscription" label, and changes "auth" to "Authority". _TEST PLAN_ Before applying patch: 1) View logs for patrons, new biblio, serials, and authorities. Apply the patch: 1) Notice the capitalization and new/modified labels. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23918|0 |1 is obsolete| | --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23925 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23925&action=edit Bug 11473 - add 'biblio' and 'item' to cataloguing logging info This patch adds the words 'biblio' and 'item' to the 'info' of the cataloguing logs which were missing them (such as biblio delete, biblio mod, item mod, upload cover image). This patch also adds 'authority' for authority mod. _TEST PLAN_ Before applying: 1) Create/view mods for items, biblios, and authorities. 2) Create/view biblio deletion 3) Create/view upload cover image log 4) Note that none of these contain the words 'biblio','item',or 'authority' in their "Info" columns. Apply patch. 5) Repeat steps 1-3 6) Note that the new logs contain 'biblio','item', and 'authority' in their "Info" column, while the past ones don't. 7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item' appear in their "Object" column for the new logs Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m QA Contact|testopia@bugs.koha-communit |jonathan.druart@biblibre.co |y.org |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: It is not perfect but it is far better than it is currently. 2 first patches could be squashed for more visibility. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23922|0 |1 is obsolete| | Attachment #23923|0 |1 is obsolete| | Attachment #23924|0 |1 is obsolete| | Attachment #23925|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24152 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24152&action=edit Bug 11473 - Fix log viewer template conditions This patch adds the 'loopro' key to the 'module' value, so that conditions are actually triggered in the template logic. (Note: loopro.CIRCULATION is valid, but I changed it for the sake of consistency across the different conditions.) This patch also adds substr checks to the 'info' column when using the cataloguing module. This will check for 'item' and 'biblio', so that the appropriate label qualifer can be shown in the log viewer. If either term is absent, the unqualified number will be shown instead (this will be the majority of action logs at this point). _TEST PLAN_ Before applying: 1) Access log viewer from Tools (or wherever really) 2) Look up logs for circulation, patrons, cataloguing, serial, authorities, etc. 3) Note that the "Object" will always just be a number without qualification. After applying the patch: 1) Look at those same logs 2) Note that the object number for borrowers will usually be prefaced by 'member' (notwithstanding FINES which aren't taken into account in this template yet); new bibs and new items should say 'Item X' or 'Biblio X'. Serials should have a link. Authorities should have a link and an 'auth' preface. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24153 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24153&action=edit Bug 11473 - Remove boilerplate in log viewer template This patch eliminates unnecessary conditions and boilerplate. _TEST PLAN_ Apply the patch. 1) Try viewing logs for circulation, patrons, fines, cataloguines, serials, authorities, etc. 2) Note that everything should look exactly the same as before, with one exception: FINES 3) Fines will now show "member X" for the user associated with the fine. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24154 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24154&action=edit Bug 11473 - Improve wording in log viewer template This patch capitalizes 'member' and 'biblio' as object labels in the log viewer. It also adds a "Subscription" label, and changes "auth" to "Authority". _TEST PLAN_ Before applying patch: 1) View logs for patrons, new biblio, serials, and authorities. Apply the patch: 1) Notice the capitalization and new/modified labels. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24155 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24155&action=edit Bug 11473 - add 'biblio' and 'item' to cataloguing logging info This patch adds the words 'biblio' and 'item' to the 'info' of the cataloguing logs which were missing them (such as biblio delete, biblio mod, item mod, upload cover image). This patch also adds 'authority' for authority mod. _TEST PLAN_ Before applying: 1) Create/view mods for items, biblios, and authorities. 2) Create/view biblio deletion 3) Create/view upload cover image log 4) Note that none of these contain the words 'biblio','item',or 'authority' in their "Info" columns. Apply patch. 5) Repeat steps 1-3 6) Note that the new logs contain 'biblio','item', and 'authority' in their "Info" column, while the past ones don't. 7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item' appear in their "Object" column for the new logs Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #14 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master, along with a follow-up that repairs links to the item from item modification log entries. Thanks, David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11473 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #15 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patches pushed to 3.14.x, will be in 3.14.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org