[Bug 12670] New: Show materials label instead of code
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Bug ID: 12670 Summary: Show materials label instead of code Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl In catalogue/detail.pl, if items.materials is linked to an authorised values list, show label instead of code. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 30290 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30290&action=edit Bug 12670: Show materials label instead of code In catalogue/detail.pl, if items.materials is linked to an authorised values list, show label instead of code. Test plan: 1/ Create an authorised values list 'MATERIALS' with some values 2/ In default MARC biblio framework, link an item subfield to 'items.materials', and to the AV list 'MATERIALS' 3/ Edit an item and give a value for this subfield 4/ Go to biblio record detail page (catalogue/detail.pl) 5/ In the items table, the authorised value label should be displayed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |nick@quecheelibrary.org --- Comment #2 from Nick Clemens <nick@quecheelibrary.org> --- When testing I found that if I entered any value defined as an AV into subfield 3/materials sepcified it displayed the label whether or not the field was linked i.e. 1 - apply patch 2 - do not link any fields 3 - enter 'CART' into subfield 3 (defined as "Book Cart" in LOC category of AV) 4 - 'Book Cart' displays on catalogue/detail.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- Hi Nick, are you sure there is nothing linked to the subfield $3 ? In any framework ? Does master have the same behaviour ? Does it also happen with another subfield ? Could you also check the "Koha to MARC mappings" page (cgi-bin/koha/admin/koha2marclinks.pl) ? Thanks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Nick Clemens <nick@quecheelibrary.org> --- I cannot now recreate, still had some oddness going on but I think it was me so reverting to sign off and will test again when I have a chnace -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30290|0 |1 is obsolete| | --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 32765 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32765&action=edit Bug 12670: Show materials label instead of code In catalogue/detail.pl, if items.materials is linked to an authorised values list, show label instead of code. Test plan: 1/ Create an authorised values list 'MATERIALS' with some values 2/ In default MARC biblio framework, link an item subfield to 'items.materials', and to the AV list 'MATERIALS' 3/ Edit an item and give a value for this subfield 4/ Go to biblio record detail page (catalogue/detail.pl) 5/ In the items table, the authorised value label should be displayed. Signed-off-by: Frederic Demians <f.demians@tamil.fr> Works as described. As soon as an AV list is linked to items.materials, this patch is necessary to display materials value rather than code from the AV. Side note: items.materials is displayed in item tab on catalog/detail.pl page, but isn't displayed on catalogue/moredetail.pl. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, I see a problem here that keeps me from testing. I have changed my framework to link 952$3 (default for MARC21 materials) to an authorized value. But now when I edit an item, there is no pull down and no input field. I can't enter a new value? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Turns out... it was the 'collapsed' flag causing some weirdness, back to testing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have tested this some more and I don't feel like this is working well: - The check-in and check-out messages still show the code and not the description. - The code is not specific enough. It doesn't check if the subfield is mapped to an authorized value. The translation to a description will also happen, if you haven't mapped your framework to an authorized value at all. - It doesn't look for a specific authorized value category, so if you have the same codes in multiple categories, the display is kinda random. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #9 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Katrin Fischer from comment #8)
- The check-in and check-out messages still show the code and not the description.
Do you mean that a follow-up patch is required? I agree that if this patch is necessary on catalogue/details.pl page, other pages displaying items.materials should be updated.
- The code is not specific enough. It doesn't check if the subfield is mapped to an authorized value. The translation to a description will also happen, if you haven't mapped your framework to an authorized value at all.
I don't understand. How can the translation to a description happen without AV?
- It doesn't look for a specific authorized value category, so if you have the same codes in multiple categories, the display is kinda random.
I think you're wrong. The call to GetAuthValCode() returns the name of the AV list linked to items.materials. And then, the available values for this specific AV are retrieved by calling GetAuthorisedValues. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Frederic, I was surprised as well. I first linked it to the reports group authorized value and added ACC - it worked and translated the display to Accounts. Then I removed the linking, it still showed Accounts. Then I changed the code to ADDR - a code from another authorized value, and it translated it to the description given there. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #11 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Katrin Fischer from comment #10)
Hi Frederic, I was surprised as well. I first linked it to the reports group authorized value and added ACC - it worked and translated the display to Accounts. Then I removed the linking, it still showed Accounts. Then I changed the code to ADDR - a code from another authorized value, and it translated it to the description given there.
I can't reproduce that! Are you sure you're modifying the correct framework? the one used for the biblio record you test? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I was using the default framework. I have a feeling like we should test that the routine actually returns an AV, but I haven't taken a closer look. The check-in/check-out messages could be fixed in a separate bug, but I think we should aim to make this a complete feature. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Katrin Fischer from comment #12)
I was using the default framework. I have a feeling like we should test that the routine actually returns an AV, but I haven't taken a closer look.
The check-in/check-out messages could be fixed in a separate bug, but I think we should aim to make this a complete feature.
Looking closely at the code (detail.pl), It seems that code refactoring should be welcome on the way all AV are decoded... For a lot of fields, GetKohaAuhtorisedValues/GetAuthValCode are called: location, ccode, copynumber, itemlost, damaged, etc. We could have a new function doing all the decoding in once: DecodeAuthValues( $item, $fw, qw/ items.location items. ccode / ); And in C4::Koha, authorized values are not cached... So it means that if we have to display, let say, 30 items, having each 5 AV, 150 SQL queries are sent to MySQL. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32765|0 |1 is obsolete| | --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 40671 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40671&action=edit Bug 12670: Show materials label instead of code Rebased on master + fixed issues when items.materials is not linked to AV list -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Katrin or Frédéric, could you be more specific about check-in and check-out messages? I don't see what you are talking about. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Julian, when you check-in or check-out an item with materials set, there is a little dialog box showing up with the text from the field. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 --- Comment #17 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 41888 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41888&action=edit Bug 12670: Show materials label in checkin/checkout messages -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12670 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Needs Signoff |Patch doesn't apply --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- CONFLICT (content): Merge conflict in circ/circulation.pl -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org