Bug 33612

Summary: Staff with limited permissions don't always get an expanded catalog_search bar
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: caroline.cyr-la-rose, david, gmcharlt, jonathan.druart, kyle.m.hall, oleonard
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35657
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 33612: Fix cat-search.inc and remove home-search.inc
Bug 33612: Fix cat-search.inc and remove home-search.inc

Description Lucas Gass (lukeg) 2023-04-25 21:27:30 UTC
To recreate:

1. Setup a staff member with staff access permission but no circulate permissions. 
2. Log in as that and on the intranet-home page notice that 'Search patron' bar across the top is not visible by default. 
3. Click the 'Search patrons' link at the top, now you see the search bar.
4. This is also true on the item search page. 

It is because we are using the old home-search.inc when it should be the cat-search.inc

If you git grep 'home-search.inc' you'll see it on these two pages.

koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:    [% INCLUDE 'home-search.inc' %]
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt:        [% INCLUDE 'home-search.inc' %]


We can change that to cat-search.inc and remove the unused home-search.inc, I think.
Comment 1 Lucas Gass (lukeg) 2023-04-25 21:38:06 UTC
Created attachment 150225 [details] [review]
Bug 33612: Fix cat-search.inc and remove home-search.inc

To test:
1. Setup a staff member with staff access permission but no circulate permissions.
2. Log in as that and on the intranet-home page notice that 'Search patron' bar across the top is not visible by default.
3. Click the 'Search patrons' link at the top, now you see the search bar.
4. This is also true on the item search page.
5. Apply patch
6. Try looking at the intranet home and item search pages again, the search bar should be expanded by default.
7. git grep 'home-search.inc' , this include should be gone along with all references to it.
8. Log in as a superlibrarian and make sure the top search bars still seem correct and default to the correct ones.

https://bugs.koha-community.org/show_bug.cgi?id=33584
Comment 2 David Nind 2023-04-26 18:26:31 UTC
Created attachment 150253 [details] [review]
Bug 33612: Fix cat-search.inc and remove home-search.inc

To test:
1. Setup a staff member with staff access permission but no circulate permissions.
2. Log in as that and on the intranet-home page notice that 'Search patron' bar across the top is not visible by default.
3. Click the 'Search patrons' link at the top, now you see the search bar.
4. This is also true on the item search page.
5. Apply patch
6. Try looking at the intranet home and item search pages again, the search bar should be expanded by default.
7. git grep 'home-search.inc' , this include should be gone along with all references to it.
8. Log in as a superlibrarian and make sure the top search bars still seem correct and default to the correct ones.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-04-26 18:27:29 UTC
I amended the commit message to remove the incorrect Bugzilla link at the bottom.
Comment 4 Lucas Gass (lukeg) 2023-04-26 19:25:40 UTC
(In reply to David Nind from comment #3)
> I amended the commit message to remove the incorrect Bugzilla link at the
> bottom.

Thank you!
Comment 5 Katrin Fischer 2023-05-01 14:06:29 UTC
*** Bug 33536 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Druart 2023-05-03 09:48:01 UTC
You are changing the selected tab, is that expected?

mainpage now has "search catalog", it was "Checkout".
Comment 7 Katrin Fischer 2023-05-03 21:03:53 UTC
Joubu is right, the first selected tab on the start page changes with this patch. I wonder if we could get away with that, but it's certainly a behavior change
Comment 8 Lucas Gass (lukeg) 2023-05-03 21:05:34 UTC
(In reply to Katrin Fischer from comment #7)
> Joubu is right, the first selected tab on the start page changes with this
> patch. I wonder if we could get away with that, but it's certainly a
> behavior change

We should not try to get away with that. I think we need to keep the behavior we have now, I will return to this.