Bug 9162 - Add a system preference to set which notes fields appears on title notes/description separator
Summary: Add a system preference to set which notes fields appears on title notes/desc...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P1 - high enhancement (vote)
Assignee: Vitor Fernandes
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 9495
  Show dependency treegraph
 
Reported: 2012-11-28 10:53 UTC by Vitor Fernandes
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator (4.70 KB, patch)
2012-11-28 11:09 UTC, Vitor Fernandes
Details | Diff | Splinter Review
BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator (4.67 KB, patch)
2012-12-07 13:13 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator (4.89 KB, patch)
2012-12-14 14:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator (4.76 KB, patch)
2012-12-26 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator (4.81 KB, patch)
2012-12-26 13:18 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Fernandes 2012-11-28 10:53:09 UTC
Now all notes (3XX on UNIMARC and 5XX on MARC21) appears on the title notes separator (OPAC) and description separator (Staff Client).
The fields that appear in that separators should be controlled by a system preference.

Example:

Cataloguing separator - Display section

NotesBlacklist - Don't show these [list of fields separated with comma] note fields in title notes separator (OPAC record details) and in the description separator (Staff client record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21)
Comment 1 Vitor Fernandes 2012-11-28 11:09:47 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2012-12-07 13:06:05 UTC
Vitor, for future reference you are not allowed to use tab characters in Koha code. In particular, the system preferences files are broken by tabs.
Comment 3 Kyle M Hall 2012-12-07 13:13:52 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-12-07 13:14:44 UTC
My blacklisted fields still display on the record details in the OPAC and Intranet. Please provide a test plan, I may be testing this incorrectly.
Comment 5 Kyle M Hall 2012-12-07 13:17:02 UTC
One other QA comment, please don't just use 'XXX' for DB revisions. updatedatabase.pl doesn't like that, please use the format '3.11.00.XXX'.
Comment 6 Vitor Fernandes 2012-12-07 14:43:50 UTC
Hi Kyle,

Sorry for the tab and XXX version problems.
These are my first patches so it's normal to have some errors.
I'll try to avoid those in the future.

Problem:

- All notes fields are shown in the 'title notes' separator on OPAC record details
- All notes fields are shown in the 'description' separator on intranet record details

Test plan:

- Search for a record that has a note field (3XX in UNIMARC or 5XX in MARC21)

- Check if that note appears in the separator 'title notes' of OPAC record details
- Add the note field tag in the created system preference
- Refresh the record detail page and check if the note stills appears

- Check if that note appears in the separator 'description' of intranet record details
- Add the note field tag in the created system preference
- Refresh the record detail page and check if the note stills appears
Comment 7 Kyle M Hall 2012-12-14 14:09:52 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2012-12-14 14:10:32 UTC
Works as advertised. Thanks for the test plan!
Comment 9 Jonathan Druart 2012-12-26 13:05:19 UTC
QA Comments:

The proposed patch works well.
However if all existing fields are blacklisted, the biblio.notes field is displayed. So if you blacklist the 300$a and if it is mapped with this db field, it will be displayed.

Possible improvement :
Perhaps some libraries would like to blacklist some fields for the opac and fewer fields for the intranet (required 1 syspref by interface).

Marked as Passed QA.
Comment 10 Jonathan Druart 2012-12-26 13:05:35 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2012-12-26 13:18:18 UTC
Created attachment 14265 [details] [review]
BUG 9162 - Add a system preference to set which notes fields appears on title notes/description separator

Added a new system preference to control the fields to not appear in the separator.
Change GetMarcNotes to use the system preference created to only appear the fields that aren't in the list,

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
FIX some indentation in C4/Biblio.pm
+FIX 1 end of parentheses in sysprefs.sql
Comment 12 Jared Camins-Esakov 2012-12-27 14:58:36 UTC
This patch has been pushed to master.