Bug 17938

Summary: XSLT: Label of 583 is repeated for multiple tags and private notes don't display in staff
Product: Koha Reporter: Karen <karenliang.student>
Component: OPACAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: 1joynelson, david, jonathan.druart, katrin.fischer, liz, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the display for records with multiple 583s. Previously the label "Action note" was repeated, now the label appears once and multiple fields are separated by a |. There is now a space between $z and other subfields. Private notes are now displayed in the staff interface. Notes: Indicator 1 = private: These will not display in the OPAC. Indicator 1 = 0 or empty: These will display in the OPAC. The staff interface will display all 583s.
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Bug Depends on: 5919, 17823    
Bug Blocks:    
Attachments: Bug 17938 - XSLT: if 583 is repeated, the label will appear multiple times
Bug 17983: Fix display of label for repeated MARC 583 - Action note fields
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields

Description Karen 2017-01-19 01:22:59 UTC
This will build on the patch bug 17823.
Comment 1 Karen 2017-01-19 03:43:58 UTC
Created attachment 59204 [details] [review]
Bug 17938 - XSLT: if 583 is repeated, the label will appear multiple times

Test plan
1) Edit a record
2) Repeat the Action note tag to add another Action note
3) Save record and confirm that the Action note label appears multiple
times.
4) Apply patch and refresh page
5) All Action notes should now be on one line and separated by "|"
Comment 2 Liz Rea 2017-01-30 00:50:01 UTC
Hi Karen,

I think there may be a bug in your patch - without an indicator, or with indicator 0, the notes do not display, but the action-note label and associated pipe separators do.

Thanks for having a look into this problem though!

Cheers,
Liz
Comment 3 Katrin Fischer 2020-03-27 23:37:45 UTC
Created attachment 102025 [details]
Bug 17983: Fix display of label for repeated MARC 583 - Action note fields

When there are mulitple 583 on a record, the label "Action note" will be
repeated for each. This fixes it, so that the label only appears once and
multiple fields are separated by | following the existing pattern.

Also makes sure there is a space between $z and other subfields.

Note:
Ind. 1 = private - These won't display in the OPAC
Ind. 1 = 0 or empty - These will display in the OPAC
Staff will display all 583 independent from indicator.

To test:
- Add one or more records with none, one and muliple 583, at least one including $z
  For examples see:
  http://www.loc.gov/marc/bibliographic/bd583.html
- Verify display problems
- Apply patch
- Verify display is improved - one label and $z is followed by a space
Comment 4 David Nind 2020-03-29 10:22:23 UTC
Created attachment 102053 [details] [review]
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields

When there are mulitple 583 on a record, the label "Action note" will be
repeated for each. This fixes it, so that the label only appears once and
multiple fields are separated by | following the existing pattern.

Also makes sure there is a space between $z and other subfields.

Note:
Ind. 1 = private - These won't display in the OPAC
Ind. 1 = 0 or empty - These will display in the OPAC
Staff will display all 583 independent from indicator.

To test:
- Add one or more records with none, one and muliple 583, at least one including $z
  For examples see:
  http://www.loc.gov/marc/bibliographic/bd583.html
- Verify display problems
- Apply patch
- Verify display is improved - one label and $z is followed by a space

https://bugs.koha-community.org/show_bug.cgi?id=17938

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2020-03-31 10:50:15 UTC
Created attachment 102120 [details] [review]
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields

When there are mulitple 583 on a record, the label "Action note" will be
repeated for each. This fixes it, so that the label only appears once and
multiple fields are separated by | following the existing pattern.

Also makes sure there is a space between $z and other subfields.

Note:
Ind. 1 = private - These won't display in the OPAC
Ind. 1 = 0 or empty - These will display in the OPAC
Staff will display all 583 independent from indicator.

To test:
- Add one or more records with none, one and muliple 583, at least one including $z
  For examples see:
  http://www.loc.gov/marc/bibliographic/bd583.html
- Verify display problems
- Apply patch
- Verify display is improved - one label and $z is followed by a space

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2020-03-31 10:52:36 UTC
Katrin, please adjust bug report's title (the most important part to me is the display of the private notes staff-side)
Comment 7 Katrin Fischer 2020-03-31 20:17:37 UTC
(In reply to Jonathan Druart from comment #6)
> Katrin, please adjust bug report's title (the most important part to me is
> the display of the private notes staff-side)

You are right - thank you. Actually surprising that it hasn't worked this way before?
Comment 8 Martin Renvoize 2020-04-03 13:24:01 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Joy Nelson 2020-04-28 21:21:02 UTC
backported to 19.11.x branch for 19.11.06
Comment 10 Lucas Gass 2020-05-11 19:45:41 UTC
backported to 19.05.x for 19.05.11