Would be nice if in the staff client there was some indication that a record you are viewing is suppressed in the OPAC. This would be an XSLT customization.
Created attachment 42424 [details] [review] Bug 14377: This development will show 'Suppressed in OPAC' if the 942$n is set to 1. Test Plan: 1) Apply this patch 2) Ensure you are using the default XSLT setting for the staff view. 3) Find or create a record with MARC tags 942$n=1 4) Check for “Suppressed in OPAC” at the top of the results div and at the top of the full record display.
942 is wrapped with id="suppressed_opac" to make individual styling possible. (In reply to Winona Salesky from comment #1) > Created attachment 42424 [details] [review] [review] > Bug 14377: This development will show 'Suppressed in OPAC' if the 942$n is > set to 1. > > Test Plan: > 1) Apply this patch > 2) Ensure you are using the default XSLT setting for the staff view. > 3) Find or create a record with MARC tags 942$n=1 > 4) Check for “Suppressed in OPAC” at the top of the results div and at the > top of the full record display.
Comment on attachment 42424 [details] [review] Bug 14377: This development will show 'Suppressed in OPAC' if the 942$n is set to 1. Hi Winona, can you please use a class instead of an id for the result lists as the element can show up there repeatedly?
Created attachment 42436 [details] [review] Bug 14377: This development will show 'Suppressed in OPAC' if the 942$n is set to 1. Changed id="suppressed_opac" to class="suppressed_opac". Test Plan: 1) Apply this patch 2) Ensure you are using the default XSLT setting for the staff view. 3) Find or create a record with MARC tags 942$n=1 4) Check for “Suppressed in OPAC” at the top of the results div and at the top of the full record display.
Created attachment 42709 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles.
(In reply to Winona Salesky from comment #5) > Created attachment 42709 [details] [review] [review] > Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. > > Includes class="suppressed_opac" for library specific styles. Test Plan: 1) Apply this patch 2) Ensure you are using the default XSLT setting for the staff view. 3) Find or create a record with MARC tags 942$n=1 4) Check for “Suppressed in OPAC” at the top of the results div and at the top of the full record display. Recommended custom CSS: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; }
Created attachment 43026 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Works as expected. Style note: Without recommended CSS the 'Suppressed in Opac' in search results is next to result number and above title/author. I think the default location should be below these two if possible
Hm, this last patch doesn't work for me. I have reindexed and the MARC view shows: 942 _2ddc _cBK _n1 <datafield tag="942" ind1=" " ind2=" "> <subfield code="2">ddc</subfield> <subfield code="c">BK</subfield> <subfield code="n">1</subfield> </datafield> I think the test doesn't work quite right, but I haven't figured out why: test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']" Can you see, what might go wrong here? I am also not a fan of showing the bibnumber, I think it's more likely to confuse than being helpful. I'd like it better if we showed only the text.
Would you mind sending me your marcxml test record to test? Thanks, -Winona wsalesky@gmail.com (In reply to Katrin Fischer from comment #9) > Hm, this last patch doesn't work for me. I have reindexed and the MARC view > shows: > > 942 _2ddc > _cBK > _n1 > > <datafield tag="942" ind1=" " ind2=" "> > <subfield code="2">ddc</subfield> > <subfield code="c">BK</subfield> > <subfield code="n">1</subfield> > </datafield> > > I think the test doesn't work quite right, but I haven't figured out why: > test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']" > > Can you see, what might go wrong here? > > I am also not a fan of showing the bibnumber, I think it's more likely to > confuse than being helpful. I'd like it better if we showed only the text.
I am unable to reproduce this issue. The record you sent me runs fine on my system. Can you give me any additional details about how you are testing this patch? Also, if you are comfortable looking in the xslt could you try changing the test (line 94 on MARC21slim2intranetDetail.xsl) to: test="marc:datafield[@tag=942][normalize-space(marc:subfield[@code='n']) = '1'] An additional tester may also be helpful. Thanks, -Winona (In reply to Katrin Fischer from comment #9) > Hm, this last patch doesn't work for me. I have reindexed and the MARC view > shows: > > 942 _2ddc > _cBK > _n1 > > <datafield tag="942" ind1=" " ind2=" "> > <subfield code="2">ddc</subfield> > <subfield code="c">BK</subfield> > <subfield code="n">1</subfield> > </datafield> > > I think the test doesn't work quite right, but I haven't figured out why: > test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']" > > Can you see, what might go wrong here? > > I am also not a fan of showing the bibnumber, I think it's more likely to > confuse than being helpful. I'd like it better if we showed only the text.
Some testing from my part: If I put an additional blank after the 1 in 942n, the record is suppressed in OPAC (with syspref 'OpacSuppression set to 'Hide'), but the message does not show up on the staff detail view. If I then add the normalize-space function to the XSL as described in comment #11 the message appears. If I have use the authorized value YesNo, it does not work. I tweaked the xsl to display the 942nvalue, and it is Yes instead of 1 As Katrin mentioned on IRC this is a problem, because the auhorized values are translated.
Workaround and/or possible solution: I created an authorized value category ONE_ZERO and gave it 0 / 1 for the values and for all descriptions. Then I linked it with 942 n. Display of suppression message is fine. And it displays 1 or 0 correctly while editing 942 n for records that formerly had YES_NO values.
Hm, I think 0/1 as the description is not very friendly for the cataloger and might lead to some confusion. Another suggestion: We could use the mechanism that makes system preferences available in the XSLT. We could create a variable to store the description that matches the authorised value category linked to 942$n for the value 1. And then base the check on that. Does that make sense? :)
This would work for me. I'm afraid I am still using learning the ins and outs of Koha, and did not realize there were other possible values to 942$n. -Winona (In reply to Katrin Fischer from comment #14) > Hm, I think 0/1 as the description is not very friendly for the cataloger > and might lead to some confusion. Another suggestion: We could use the > mechanism that makes system preferences available in the XSLT. We could > create a variable to store the description that matches the authorised value > category linked to 942$n for the value 1. And then base the check on that. > Does that make sense? :)
(In reply to Katrin Fischer from comment #14) > Hm, I think 0/1 as the description is not very friendly for the cataloger > and might lead to some confusion. Another suggestion: We could use the > mechanism that makes system preferences available in the XSLT. We could > create a variable to store the description that matches the authorised value > category linked to 942$n for the value 1. And then base the check on that. > Does that make sense? :) I don't think I followed that well ; ) Here's what I'm thinking: 1) Add a new system preference OpacSuppressionValue that defines the value ( 1, the Authorised Value description for 1, default of 1 if not set ). So this value could be 1, Yes, Si, Oui or what have you. 2) Pass this new pref to the XSLT 3) Compare against the pref value rather than just '1' Is this what you are thinking Katrin?
Hi Kyle, I think we don't need a system preference, because we can find out what the right value is within Koha: 1) Look up, which authorised value is linked to 942$n 2) Look up for the authorised value, which description is used for the value 1 Does this make sense?
... and the value you get, you pass into the XSLT using a similar mechanism as for the system preferences. And later on we can enhance it to also work for mulitple translations, when a similar mechanism as proposed in 14100 is implemented for authorised values.
Hi, we're the institution that requested the bibnumber show up. Our staff do a lot of searching but standard numbers such as the bib record number, OCLC number, barcode, ISSN. It's a more direct way to search in Koha which tends to be very keyword heavy. Staff want to get fewer results, not more or even multiple. Seeing the record number also helps identify it quickly versus the title which can be more generic and/or be one of other similar titles. Anyway, that's the reason we made that request.
Hi Karl, with this patch the bibnumber will only show for suppressed records - that's what didn't make so much sense to me. I am not opposed at all to add the bibnumber to display in general, but then maybe on a separate bug as it doesn't really fit here :)
Created attachment 45564 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 45565 [details] [review] Bug 14377 [QA Followup] - Use true value description for authorised value Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 45566 [details] [review] Bug 14377 [QA Followup] - Use true value description for authorised value Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 45568 [details] [review] Bug 14377 [QA Followup] - Remove biblionumber, move message to below title for search results
This is not marcflavour independent: 942$n is hardcoded, so it won't work for UNIMARC The XSLT changes have been done for MARC21 only, if NORMARC uses 942$n also, it would be easy to c/p the changes to the according XSLT files. Does a UNIMARC user want to provide a patch for UNIMARC XSLT?
Created attachment 46900 [details] [review] Bug 14377 [QA Followup] - Add support for NORMARC
(In reply to Jonathan Druart from comment #25) > This is not marcflavour independent: 942$n is hardcoded, so it won't work > for UNIMARC > The XSLT changes have been done for MARC21 only, if NORMARC uses 942$n also, > it would be easy to c/p the changes to the according XSLT files. > > Does a UNIMARC user want to provide a patch for UNIMARC XSLT? As far as I can tell, UNIMARC does not have record suppression support! I based this on the fact that I can't find any reference to the Suppress index in marc_defs/unimarc, so unless I'm mistaken, it's a non-issue.
I think the 'problem' with UNIMARC was that there was no default standard field chosen. The systempreference description used to say something about adding a suppress index. So that might be more complicated - as we don't know what people have already been using and not sure how hard it would be to pick a new default fiel for that purpose in UNIMARC.
I will let a MARC21 user to QA this patchset, but I am pretty sure we need a unless UNIMARC statement in transformMARCXML4XSLT.
Created attachment 46993 [details] [review] Bug 14377 [QA Followup] - Don't do 942$n processing for UNIMARC
Katrin told me to do it! <cait> could someone mark 14377 doesn't apply for me? <cait> fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl).
Created attachment 48657 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48658 [details] [review] Bug 14377 [QA Followup] - Use true value description for authorised value Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48659 [details] [review] Bug 14377 [QA Followup] - Remove biblionumber, move message to below title for search results
Created attachment 48660 [details] [review] Bug 14377 [QA Followup] - Add support for NORMARC
Created attachment 48661 [details] [review] Bug 14377 [QA Followup] - Don't do 942$n processing for UNIMARC
Rebase, easy conflict with bug 4941 fixed.
Created attachment 49718 [details] [review] [PASSED QA] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49719 [details] [review] [PASSED QA] Bug 14377 [QA Followup] - Use true value description for authorised value Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49720 [details] [review] [PASSED QA] Bug 14377 [QA Followup] - Remove biblionumber, move message to below title for search results Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49721 [details] [review] [PASSED QA] Bug 14377 [QA Followup] - Add support for NORMARC Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49722 [details] [review] [PASSED QA] Bug 14377 [QA Followup] - Don't do 942$n processing for UNIMARC Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Fixed supressed typo within this patch.
I was about to pass this, but then found 2 things: 1) The text will only be true if OpacSuppression is turned on. So I think we will want to add a check for that, maybe here? unless ( $marcflavour eq 'UNIMARC' ) { 2) With all the discussion recently - I am a bit worried about performance here. Could it be speedier to send the original value of 942$n (the code) to the template and check for 1/something vs. 0/empty? This way we wouldn't have to care about the AV or framework. But not sure if this is an option. I included a typo fix in the last patch, as the QA tools had complained about it. It's in one of the comments.
Created attachment 50360 [details] [review] Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
Created attachment 50361 [details] [review] Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
If suppression is not turned on, the text "#bibno - Suppressed in OPAC" does not make sense. Failed QA
Created attachment 50720 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 50721 [details] [review] Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
(In reply to Marcel de Rooy from comment #46) > If suppression is not turned on, the text "#bibno - Suppressed in OPAC" does > not make sense. > Failed QA Patch now only displays message of OpacSuppression is enabled!
The condition doesn't seem correct: $tag ne '942' && $subfield ne 'n' && $marcflavour ne 'UNIMARC' Wouldn't that be false for a non-UNIMARC installation and something like 999$n or 942$c?
Giving it a try: unless (942 and n and (marc21 or normarc) ) ? After taking another look: I think the # is not translatable here: <xsl:value-of select="concat('#',marc:datafield[@tag=999]/marc:subfield[@code='c'])"/> I'd still be happier with generally displaying the bibnumber somewhere and separate it from the OPAC suppression information.
Created attachment 50839 [details] [review] Bug 14377 [QA Followup] - Remove biblionumber from messages
Created attachment 50842 [details] [review] Bug 14377 [QA Followup] - Fix conditional
Created attachment 50843 [details] [review] Bug 14377 [QA Followup] - Fix conditional
Created attachment 50844 [details] [review] Bug 14377 [QA Followup] - Fix conditional
QA: Looking here now.
Created attachment 50881 [details] [review] Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1. Includes class="suppressed_opac" for library specific styles. Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; } Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 50882 [details] [review] Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 50883 [details] [review] Bug 14377 [QA Followup] - Remove biblionumber from messages Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 50884 [details] [review] Bug 14377 [QA Followup] - Fix conditional Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 50885 [details] [review] Bug 14377: [QA Follow-up] Correct typo and comment [1] Remove a vim inserted i from XSLT.pm: IdRefi => IdRef. [2] The comment about UNIMARC is somewhat confusing. Rephrased it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA Comment: Thanks all involved. In view of time elapsed and effort, I am passing QA on this patch set. I am not really happy about the change in transformMARCXML4XSLT. Adding the hardcoded 942n exception there is no price winner. Also I note that this report does not add these changes to NORMARC XSLT. No blocker, but it would have been better.
*** Bug 8536 has been marked as a duplicate of this bug. ***
Created attachment 50987 [details] [review] Bug 14377 [QA Followup] - Add supression message to NORMARC XSLT
Pushed to master for the May 2016 release. Thanks Winona!