Summary: | Don't show label if 520 ind1=8 (MARC21) | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | MARC Bibliographic data support | Assignee: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Status: | Pushed to main --- | QA Contact: | Lucas Gass (lukeg) <lucas> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | esther.melander, lucas, oleonard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch fixes the logic in the MARC21 XSLT files to not show a label on the 520 field if the first indicator is set to 8.
|
Version(s) released in: |
25.05.00
|
Circulation function: | |||
Attachments: |
Bug 38180: Don't show label if 520 ind1=8 (MARC21)
Bug 38180: Don't show label if 520 ind1=8 (MARC21) Bug 38180: Don't show label if 520 ind1=8 (MARC21) |
Description
Caroline Cyr La Rose
2024-10-15 19:07:39 UTC
Created attachment 172793 [details] [review] Bug 38180: Don't show label if 520 ind1=8 (MARC21) This patch amends the display constant for field 520 if the first indicator is set to 8. According to MARC21 documentation (https://www.loc.gov/marc/bibliographic/bd520.html), the field's labels depend on the value of indicator 1. First Indicator Second Indicator Display constant controller empty - Summary 0 - Subject 1 - Review 2 - Scope and content 3 - Abstract 4 - Content advice 8 - No display constant generated Prior to this patch, a 520 field with ind1 = 8 is displayed as 'Summary'. After this patch, there is no label. To test: 1. Create or edit a record, and add 7 x 520 tags: - Add one 520 tag with no value in ind1, enter 'Summary' in 520$a - Add one 520 tag with 0 in ind1, enter 'Subject' in 520$a - Add one 520 tag with 1 in ind1, enter 'Review' in 520$a - Add one 520 tag with 2 in ind1, enter 'Scope and content' in 520$a - Add one 520 tag with 3 in ind1, enter 'Abstract' in 520$a - Add one 520 tag with 4 in ind1, enter 'Content advice' in 520$a - Add one 520 tag with 8 in ind1, enter 'No display constant generated' in 520$a 2. View the record in the staff interface --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 3. View the record in the OPAC --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 4. Apply patch 5. Repeat step 2 (view the record in the staff interface; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) 6. Repeat step 3 (view the record in the OPAC; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) https://bugs.koha-community.org/show_bug.cgi?id=38081 Created attachment 172922 [details] [review] Bug 38180: Don't show label if 520 ind1=8 (MARC21) This patch amends the display constant for field 520 if the first indicator is set to 8. According to MARC21 documentation (https://www.loc.gov/marc/bibliographic/bd520.html), the field's labels depend on the value of indicator 1. First Indicator Second Indicator Display constant controller empty - Summary 0 - Subject 1 - Review 2 - Scope and content 3 - Abstract 4 - Content advice 8 - No display constant generated Prior to this patch, a 520 field with ind1 = 8 is displayed as 'Summary'. After this patch, there is no label. To test: 1. Create or edit a record, and add 7 x 520 tags: - Add one 520 tag with no value in ind1, enter 'Summary' in 520$a - Add one 520 tag with 0 in ind1, enter 'Subject' in 520$a - Add one 520 tag with 1 in ind1, enter 'Review' in 520$a - Add one 520 tag with 2 in ind1, enter 'Scope and content' in 520$a - Add one 520 tag with 3 in ind1, enter 'Abstract' in 520$a - Add one 520 tag with 4 in ind1, enter 'Content advice' in 520$a - Add one 520 tag with 8 in ind1, enter 'No display constant generated' in 520$a 2. View the record in the staff interface --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 3. View the record in the OPAC --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 4. Apply patch 5. Repeat step 2 (view the record in the staff interface; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) 6. Repeat step 3 (view the record in the OPAC; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) https://bugs.koha-community.org/show_bug.cgi?id=38081 Signed-off-by: esther <esther@bywatersolutions.com> There was no label for tag 520 when the first indicator is an 8. Created attachment 177401 [details] [review] Bug 38180: Don't show label if 520 ind1=8 (MARC21) This patch amends the display constant for field 520 if the first indicator is set to 8. According to MARC21 documentation (https://www.loc.gov/marc/bibliographic/bd520.html), the field's labels depend on the value of indicator 1. First Indicator Second Indicator Display constant controller empty - Summary 0 - Subject 1 - Review 2 - Scope and content 3 - Abstract 4 - Content advice 8 - No display constant generated Prior to this patch, a 520 field with ind1 = 8 is displayed as 'Summary'. After this patch, there is no label. To test: 1. Create or edit a record, and add 7 x 520 tags: - Add one 520 tag with no value in ind1, enter 'Summary' in 520$a - Add one 520 tag with 0 in ind1, enter 'Subject' in 520$a - Add one 520 tag with 1 in ind1, enter 'Review' in 520$a - Add one 520 tag with 2 in ind1, enter 'Scope and content' in 520$a - Add one 520 tag with 3 in ind1, enter 'Abstract' in 520$a - Add one 520 tag with 4 in ind1, enter 'Content advice' in 520$a - Add one 520 tag with 8 in ind1, enter 'No display constant generated' in 520$a 2. View the record in the staff interface --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 3. View the record in the OPAC --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - 'Summary' for the field that contains 'Subject' **(NOT OK)** 4. Apply patch 5. Repeat step 2 (view the record in the staff interface; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) 6. Repeat step 3 (view the record in the OPAC; make sure to refresh the page) --> The labels should be - 'Summary' for the field that contains 'Summary' (OK) - 'Subject' for the field that contains 'Subject' (OK) - 'Review' for the field that contains 'Review' (OK) - 'Scope and content' for the field that contains 'Scope and content' (OK) - 'Abstract' for the field that contains 'Abstract' (OK) - 'Content advice' for the field that contains 'Content advice' (OK) - Nothing for the field that contains 'Subject' (OK!!) https://bugs.koha-community.org/show_bug.cgi?id=38081 Signed-off-by: esther <esther@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Thank you Caroline for such a detailed test plan! This will leave an empty HTML elements: <span class="results_summary summary"> <span class="label"> I am a bit worried if this poses a problem with accessibility. It might be cleaner to check for indicator and then not generate the HTML tag at all. Adding Owen for HTML advice. (In reply to Katrin Fischer from comment #6) > I am a bit worried if this poses a problem with accessibility. I'm not aware of an accessibility problem. The HTML is still valid, and the WebAIM browser tool doesn't flag it. > It might be cleaner to check for indicator and then not generate the HTML > tag at all. Ideally yes, but since it doesn't seem to be causing a problem I think a simple solution is fine. Pushed for 25.05! Well done everyone, thank you! |