Bug 4944

Summary: Create separate noItemTypeImages preferences for OPAC and staff client
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, gmcharlt, katrin.fischer, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
With this patch the noItemTypeImages preference will be used for the staff interface, while a new preference OpacNoItemTypeImages is added for the OPAC. For existing installations, the OpacnoItemTypeImages will be set to the same value as noItemTypeImages on update, so there is no change in behaviour. **New system preference**: `OpacNoItemTypeImages` defaults to disabled.
Version(s) released in:
20.05.00
Attachments: Bug 4944: Add OpacNoItemTypeImages system preference
Bug 4944: Add OpacNoItemTypeImages system preference
Bug 4944: Add OpacNoItemTypeImages system preference
Bug 4944: Do not rely on the values from cache during the update DB process
Bug 4944: (RM follow-up) Add OpacNoItemTypeImages to UsageStats test

Description Owen Leonard 2010-07-06 14:53:35 UTC
At the moment the noItemTypeImages preference controls only the staff client. If my patch for Bug 4359 is approved it will affect both the staff client and the OPAC. Neither is ideal: There should be separate preferences for OPAC and staff client.
Comment 1 Paul Poulain 2011-08-02 15:13:43 UTC
still relevant (no OPACnoItemTypeImages syspref found)
Comment 2 Katrin Fischer 2014-11-02 09:04:18 UTC
Still valid.
Comment 3 Paul Poulain 2016-06-04 09:04:48 UTC
Removing assignment to me
Comment 4 Katrin Fischer 2020-03-28 13:49:24 UTC
Created attachment 102040 [details] [review]
Bug 4944: Add OpacNoItemTypeImages system preference

At the moment noItemTypeImages pref controls staff and OPAC
display. With this patch, there will be a separate OpacNoItemTypes
preference that allows to control display of each separately.

To test:
- Apply patch and run database update
In Administration:
- Search for 'noItemTypes' preferences
- Verify the settings of both prefs match
- Toggle prefs, verify everything works ok
- Go to the item types configuration page
- Try different settings for both prefs:
  - Both set to No: Only a message with a link to the prefs should show
  - Both set to Yes or either set to Yes: image configuration options
    should show
In the OPAC:
- Check the following pages with item-level_itypes = record
  - advanced search
  - detail page
  - place hold page
- Check the following pages with item-level_itypes = item
  - result list
  - a list (opac-shelves)
  - checkouts and overdues tabs in patron account
    (Note: this didn't work right before, but will now.)
  - reading history in patron account
Comment 5 David Nind 2020-03-30 09:40:16 UTC
Created attachment 102075 [details] [review]
Bug 4944: Add OpacNoItemTypeImages system preference

At the moment noItemTypeImages pref controls staff and OPAC
display. With this patch, there will be a separate OpacNoItemTypes
preference that allows to control display of each separately.

To test:
- Apply patch and run database update
In Administration:
- Search for 'noItemTypes' preferences
- Verify the settings of both prefs match
- Toggle prefs, verify everything works ok
- Go to the item types configuration page
- Try different settings for both prefs:
  - Both set to No: Only a message with a link to the prefs should show
  - Both set to Yes or either set to Yes: image configuration options
    should show
In the OPAC:
- Check the following pages with item-level_itypes = record
  - advanced search
  - detail page
  - place hold page
- Check the following pages with item-level_itypes = item
  - result list
  - a list (opac-shelves)
  - checkouts and overdues tabs in patron account
    (Note: this didn't work right before, but will now.)
  - reading history in patron account

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Jonathan Druart 2020-03-31 12:46:46 UTC
Created attachment 102127 [details] [review]
Bug 4944: Add OpacNoItemTypeImages system preference

At the moment noItemTypeImages pref controls staff and OPAC
display. With this patch, there will be a separate OpacNoItemTypes
preference that allows to control display of each separately.

To test:
- Apply patch and run database update
In Administration:
- Search for 'noItemTypes' preferences
- Verify the settings of both prefs match
- Toggle prefs, verify everything works ok
- Go to the item types configuration page
- Try different settings for both prefs:
  - Both set to No: Only a message with a link to the prefs should show
  - Both set to Yes or either set to Yes: image configuration options
    should show
In the OPAC:
- Check the following pages with item-level_itypes = record
  - advanced search
  - detail page
  - place hold page
- Check the following pages with item-level_itypes = item
  - result list
  - a list (opac-shelves)
  - checkouts and overdues tabs in patron account
    (Note: this didn't work right before, but will now.)
  - reading history in patron account

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2020-03-31 12:46:50 UTC
Created attachment 102128 [details] [review]
Bug 4944: Do not rely on the values from cache during the update DB process

We never know, as we insert values direcly to the DB, the cache may not
be correct.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Martin Renvoize 2020-04-06 09:57:58 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Martin Renvoize 2020-04-06 12:03:43 UTC
Created attachment 102438 [details] [review]
Bug 4944: (RM follow-up) Add OpacNoItemTypeImages to UsageStats test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2020-04-06 12:03:57 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-04-29 15:19:30 UTC
enhancement not backported to 19.11.x