[Bug 36281] New: Restricted info is displayed even if item is not restricted (OPAC details)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Bug ID: 36281 Summary: Restricted info is displayed even if item is not restricted (OPAC details) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org If you define a description for restricted = 0 : In OPAC details, restricted info is displayed even if item is not restricted (value 0). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |32445 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Since Bug 32445 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32445 [Bug 32445] Status display of 'not for loan' items is broken in OPAC/staff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 162950 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162950&action=edit Bug 36281: Display restricted info only if item is not restricted (OPAC details) If you define a description for restricted = 0 : In OPAC details, restricted info is displayed even if item is not restricted (value 0). This patch fixes by adding 'IF item.restricted'. Also creates a BLOCK to avoid code duplication. Also adds span around status text to create easier translation. Test plan : 1) Create a description in restricted autorised values category for value 0 2) Create a description in restricted autorised values category for value 1 3) Edit an biblio record to add an item with restricted=0 and an item with restricted=1 4) Display this biblio on OPAC details page => Check you see resticted info only for restricted item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Lucas Gass <lucas@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=36281 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162950|0 |1 is obsolete| | --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 163009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163009&action=edit Bug 36281: Display restricted info only if item is not restricted (OPAC details) If you define a description for restricted = 0 : In OPAC details, restricted info is displayed even if item is not restricted (value 0). This patch fixes by adding 'IF item.restricted'. Also creates a BLOCK to avoid code duplication. Also adds span around status text to create easier translation. Test plan : 1) Create a description in restricted autorised values category for value 0 2) Create a description in restricted autorised values category for value 1 3) Edit an biblio record to add an item with restricted=0 and an item with restricted=1 4) Display this biblio on OPAC details page => Check you see resticted info only for restricted item Signed-off-by: Lucas Gass <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=36281 Nick Clemens <nick@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=36281 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163009|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 164191 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164191&action=edit Bug 36281: Display restricted info only if item is not restricted (OPAC details) If you define a description for restricted = 0 : In OPAC details, restricted info is displayed even if item is not restricted (value 0). This patch fixes by adding 'IF item.restricted'. Also creates a BLOCK to avoid code duplication. Also adds span around status text to create easier translation. Test plan : 1) Create a description in restricted autorised values category for value 0 2) Create a description in restricted autorised values category for value 1 3) Edit an biblio record to add an item with restricted=0 and an item with restricted=1 4) Display this biblio on OPAC details page => Check you see resticted info only for restricted item Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <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=36281 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- I added my sign off, this does what it says, but I would like the RM to decide If there is no value defined for zero in RESTRICTED, then the item will be saved as null. If you add a value, you still need to set the item to '0' and choose the new description. Before this patch - create a 0, and you can use it or not, and it displays if used After this patch - create a 0, use it, it doesn't show? That seems inconsistent - can you explain your use case? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nick Clemens from comment #5)
I added my sign off, this does what it says, but I would like the RM to decide
If there is no value defined for zero in RESTRICTED, then the item will be saved as null. If you add a value, you still need to set the item to '0' and choose the new description.
Before this patch - create a 0, and you can use it or not, and it displays if used
After this patch - create a 0, use it, it doesn't show? That seems inconsistent - can you explain your use case?
Hm, this does sound a bit inconsistent. I'd be interested in how we handle the same for other similar status (WITHDRAWN, DAMAGED, NOTLOAN ...), I think we should keep things consistent. Also interested in the use case! Why would you define an entry for 0? (Failed QA = Waiting for Feedback) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Oh I see this in items table : `restricted` tinyint(1) DEFAULT NULL But other WITHDRAWN, DAMAGED, LOST have DEFAULT 0. That explains why authorized value for 0 in not needed. Some librarians which to see a text in items edition for 0 values, like "Not lost", "Not damaged" ... Should we change restricted DEFAULT 0 ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36281 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Frido, I think that does sound like a better option. And maybe a database update to correct NULL "" to 0? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org