Bug 26905

Summary: Purchase suggestion button hidden for users with suggestion permission but not acq permission
Product: Koha Reporter: Phil <gormanp>
Component: AcquisitionsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, bolshawh, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, katrin.fischer, martin.renvoize, oleonard, philip.orr, victor
Version: MainKeywords: Manual
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11911
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Philip Orr Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/823
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.01, 20.05.07
Bug Depends on:    
Bug Blocks: 27260    
Attachments: Screenshot of proposed change
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission

Description Phil 2020-11-03 09:31:18 UTC
We have library staff who may need to submit purchase suggestions to our acquisitions team, but do not need access to the rest of the acquisitions module. We do not have purchase suggestions turned on on the OPAC. 

We have permissions set so that they can manage purchase suggestions, but do not have any acquisitions module permissions set. 

Unless I'm mistaken, the only route to access the purchase suggestion form through the staff client is through the acquisitions module, but if these users have no acquisitions permissions, they do not have the acquisitions page link available on the Koha homepage. 

Can I propose that a link to the purchase suggestion form be added somewhere else on the staff client homepage, so that users with this particular set of permissions can access the form without needing to have additional acquisitions permissions?
Comment 1 Jonathan Druart 2020-12-02 10:00:43 UTC
Owen, Katrin, do you have any ideas where we could add this link?
Comment 2 Owen Leonard 2020-12-02 14:10:47 UTC
Created attachment 114096 [details]
Screenshot of proposed change

I suggest we add it to the "More" menu in the header
Comment 3 Owen Leonard 2020-12-02 14:33:43 UTC
Created attachment 114097 [details] [review]
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission

This patch adds a link to purchase suggestions from the header menu's
"More" submenu for users with suggestions management permission.

To test, apply the patch and log in to the staff interface as a user
with "suggestions_manage" permission.

- Click the "More" menu item in the header. You should see a link to
  "Suggestions" which takes you to the suggestions management page.

- Log in as a user without "suggestions_manage" permission. The link
  should not appear.
Comment 4 Jonathan Druart 2020-12-02 14:42:05 UTC
Yes, I thought about that as well.

Maybe after "Acquisition"? Right now it's between a R and T, but others are not alpha ordered :)
Comment 5 Jonathan Druart 2020-12-02 14:42:55 UTC
And... maybe we weird "suggestion", but shouldn't we display it only if it's not accessible from the acquisition module?
Comment 6 Owen Leonard 2020-12-02 20:04:36 UTC
(In reply to Jonathan Druart from comment #5)
> And... maybe we weird "suggestion", but shouldn't we display it only if it's
> not accessible from the acquisition module?

I don't see any reason to hide it. Whether or not the user has acquisitions permissions it's still a tool that one might want to access directly.
Comment 7 Lucas Gass 2020-12-03 18:19:33 UTC
Created attachment 114158 [details] [review]
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission

This patch adds a link to purchase suggestions from the header menu's
"More" submenu for users with suggestions management permission.

To test, apply the patch and log in to the staff interface as a user
with "suggestions_manage" permission.

- Click the "More" menu item in the header. You should see a link to
  "Suggestions" which takes you to the suggestions management page.

- Log in as a user without "suggestions_manage" permission. The link
  should not appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Martin Renvoize 2020-12-07 16:58:39 UTC
Created attachment 114239 [details] [review]
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission

This patch adds a link to purchase suggestions from the header menu's
"More" submenu for users with suggestions management permission.

To test, apply the patch and log in to the staff interface as a user
with "suggestions_manage" permission.

- Click the "More" menu item in the header. You should see a link to
  "Suggestions" which takes you to the suggestions management page.

- Log in as a user without "suggestions_manage" permission. The link
  should not appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2020-12-07 16:58:59 UTC
Nice little fix, works well.

Passing QA
Comment 10 Jonathan Druart 2020-12-09 10:53:20 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2020-12-10 10:32:37 UTC
Pushed to 20.11.x for 20.11.01
Comment 12 Andrew Fuerste-Henry 2020-12-17 15:23:13 UTC
Pushed to 20.05.x for 20.05.07
Comment 13 Victor Grousset/tuxayo 2020-12-17 16:38:27 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.