Bug 9495

Summary: Split NotesToHide in to two prefs for staff and OPAC
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: System AdministrationAssignee: leire
Status: Failed QA --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: costalc, gmcharlt, katrin.fischer, leire, marjorie.barry-vila
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 9162    
Bug Blocks:    
Attachments: Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC

Description Nicole C. Engard 2013-01-25 17:58:15 UTC
It would be nice if the NotesBlacklist preference were actually 2 - one for the opac and one for the staff clients.  Often staff will want to hide local notes (590) from the OPAC but will want to see them in the staff client still.
Comment 1 Claudio Costales 2014-10-03 23:18:43 UTC
It would be very nice...3.16.4
Comment 2 leire 2017-09-18 11:10:03 UTC
We have fixed this by creating a new preference to hide the notes only in the OPAC 'NotesOPACBlacklist'.

It works like the preference 'NotesBlacklist', with the fields that should not appear in the OPAC detail.
Comment 3 leire 2017-09-18 13:35:10 UTC
Created attachment 67182 [details] [review]
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC

Create the new preference NotesOPACBlacklist, it works like NotesBlacklist but these fields will not appear in the OPAC detail and will appear in the staff

Test plan:
1) Add the fields to hide in the OPAC in the new preference NotesOPACBlacklist
2) Check in the Opac detail if these fields don't appear
3) Check in the staff detail if these fields appear

Sponsored-by: Scanbit
Comment 4 leire 2017-09-18 13:49:45 UTC
Created attachment 67183 [details] [review]
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC

Fixed: Undefined subroutine &main::GetOPACMarcNotes
Comment 5 leire 2017-09-18 14:02:59 UTC Comment hidden (obsolete)
Comment 6 leire 2017-09-19 12:24:11 UTC
The sponsor of this development is this library:

Sponsored-by: Tabakalera (Ubik)
Comment 7 Alex Buckley 2017-10-04 22:49:46 UTC
Created attachment 67618 [details] [review]
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC

Create the new preference NotesOPACBlacklist, it works like NotesBlacklist but these fields will not appear in the OPAC detail and will appear in the staff

Test plan:
1) Add the fields to hide in the OPAC in the new preference NotesOPACBlacklist
2) Check in the Opac detail if these fields don't appear
3) Check in the staff detail if these fields appear

Sponsored-by: Scanbit

Followed test plan, patch worked as described. Also ran QA test tools
which passed modified files

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 8 Alex Buckley 2017-10-04 22:51:20 UTC
Created attachment 67619 [details] [review]
Bug 9495 - split NotesBlacklist in to two prefs for staff and OPAC

Fixed: Undefined subroutine &main::GetOPACMarcNotes

Followed test plan, patch worked as described, also ran QA test tools
which passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 9 Katrin Fischer 2017-12-21 23:41:03 UTC
I am in doubt about adding a new routine to C4::GetOPACMarcNotes

- We are missing tests, but tests are required for any new routine or a change to an existing one.
- I think it might make more sense to use improve GetMarcNotes to take an interface parameter, like we do in other cases. Duplicating the code will create problems, such as with bug 18198.

--

Some other small things:
- Database update should be in an atomicupdate file (see database update instructions on the wiki)
- Please use INSERT IGNORE
- It might be a bit more consistent with other prefs to have OPACNotesBlackList. Examples: (OPAC)ISBD,(OPAC)AmazonCoverImages, (OPAC)LocalCoverImages, ...)