Bug 33612 - Staff with limited permissions don't always get an expanded catalog_search bar
Summary: Staff with limited permissions don't always get an expanded catalog_search bar
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
: 33536 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-25 21:27 UTC by Lucas Gass
Modified: 2024-04-16 18:29 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 33612: Fix cat-search.inc and remove home-search.inc (6.16 KB, patch)
2023-04-25 21:38 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33612: Fix cat-search.inc and remove home-search.inc (6.16 KB, patch)
2023-04-26 18:26 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 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 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 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 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.