Bug 22434 - Correct item callnumber search link
Summary: Correct item callnumber search link
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-28 14:14 UTC by Fridolin Somers
Modified: 2021-06-14 21:28 UTC (History)
6 users (show)

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


Attachments
Bug 22434: correct item callnumber search link (13.80 KB, patch)
2019-02-28 14:27 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 22434: correct item callnumber search link (13.87 KB, patch)
2019-03-06 10:02 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2019-02-28 14:14:32 UTC
Many places show item callnumber as a link to a search on this callnumber.
The correct way is : (opac-)search.pl?q=callnum:%22[% callnumber | uri %]%22

I propose an include that creates think search link.
Comment 1 Fridolin Somers 2019-02-28 14:27:07 UTC
Created attachment 85879 [details] [review]
Bug 22434: correct item callnumber search link

Many places show item callnumber as a link to a search on this callnumber.
The correct way is : (opac-)search.pl?q=callnum:%22[% callnumber | uri %]%22

I propose an include that creates think search link.

Patch does not create an include for OPAC since callnumber search link is only in display without XSLT which will be obsolete. It juste corrects the filtering with uri instead of url.

Test plan :
1) Create an item with callnumber : AAA&1(2)3
2) Check callnumber display and search link ar OK in :
3) Intranet : perform a search in catalog search that displays this item
4) Intranet : perform a search in cataloguing serach that displays this item
5) Intranet : Create a list that displays this item
6) OPAC without XSLT : perform a search in catalog search that displays this item
7) OPAC without XSLT : perform a group search in catalog search that displays this item
Comment 2 Hayley Pelham 2019-03-04 02:52:36 UTC
Hi,

I've tested up until Step 7, all looks fine. Would you mind explaining what you mean in Step 7 when you say 'group search'?

Cheers,
Hayley
Comment 3 Biblibre Sandboxes 2019-03-06 10:02:10 UTC
Patch tested with a sandbox, by Theodoros Theodoropoulos <theod@lib.auth.gr>
Comment 4 Biblibre Sandboxes 2019-03-06 10:02:32 UTC
Created attachment 86132 [details] [review]
Bug 22434: correct item callnumber search link

Many places show item callnumber as a link to a search on this callnumber.
The correct way is : (opac-)search.pl?q=callnum:%22[% callnumber | uri %]%22

I propose an include that creates think search link.

Patch does not create an include for OPAC since callnumber search link is only in display without XSLT which will be obsolete. It juste corrects the filtering with uri instead of url.

Test plan :
1) Create an item with callnumber : AAA&1(2)3
2) Check callnumber display and search link ar OK in :
3) Intranet : perform a search in catalog search that displays this item
4) Intranet : perform a search in cataloguing serach that displays this item
5) Intranet : Create a list that displays this item
6) OPAC without XSLT : perform a search in catalog search that displays this item
7) OPAC without XSLT : perform a group search in catalog search that displays this item

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Comment 5 Theodoros Theodoropoulos 2019-03-06 10:14:37 UTC
The proposed patch seems to work with the latest master (as of today) and with minor changes can be backported to 17.xx

Thanks Fridolin for taking time to work on this issue.
Comment 6 Jonathan Druart 2019-03-06 18:47:57 UTC
Could you explain the issue you are trying to fix?

Without the patch:
I have an item with its callnumber set to AAA&1(2)3
I launch a search and see a link /catalogue/search.pl?idx=callnum&q=%22AAA%261(2)3%22
I click on it and I am redirected to the bibliographic detail page.
Comment 7 Jonathan Druart 2019-03-06 18:50:13 UTC
(In reply to Hayley Mapley from comment #2)
> Hi,
> 
> I've tested up until Step 7, all looks fine. Would you mind explaining what
> you mean in Step 7 when you say 'group search'?
> 
> Cheers,
> Hayley

Hayley, you need to create a library group (Home › Administration › Library groups) with the "Use for staff search groups" feature, then on the advanced search form you will see it at the bottom of the page ("Groups of libraries").
Comment 8 Hayley Pelham 2019-03-06 21:25:05 UTC
(In reply to Jonathan Druart from comment #7)
> (In reply to Hayley Mapley from comment #2)
> > Hi,
> > 
> > I've tested up until Step 7, all looks fine. Would you mind explaining what
> > you mean in Step 7 when you say 'group search'?
> > 
> > Cheers,
> > Hayley
> 
> Hayley, you need to create a library group (Home › Administration › Library
> groups) with the "Use for staff search groups" feature, then on the advanced
> search form you will see it at the bottom of the page ("Groups of
> libraries").

Thanks for letting me know Jonathan!
Comment 9 Fridolin Somers 2019-03-07 08:52:18 UTC
(In reply to Jonathan Druart from comment #6)
> Could you explain the issue you are trying to fix?
> 
> Without the patch:
> I have an item with its callnumber set to AAA&1(2)3
> I launch a search and see a link
> /catalogue/search.pl?idx=callnum&q=%22AAA%261(2)3%22
> I click on it and I am redirected to the bibliographic detail page.

Using idx=callnum will use all search options like the auto-trunction for example, that is useless in this case.
Many places like the facets prefer <index>:<query>.
This is also good for ES.
And some places where missing the double quotes.
Comment 10 Martin Renvoize 2019-04-08 11:38:13 UTC
I tried rebasing this one for QA but found a couple of cases where I wasn't 100% sure of the intention as as such have deferred it back to "Patch doesn't apply"
Comment 11 Fridolin Somers 2019-10-16 14:18:33 UTC
Oh but I don't remember adding &#91; and &#93;
Needs rework.
Comment 12 Fridolin Somers 2020-06-30 10:12:54 UTC
(In reply to Fridolin SOMERS from comment #11)
> Oh but I don't remember adding &#91; and &#93;
> Needs rework.

Ahhhh &#91; is for [, because its part of the TT syntaxe [% ...

In the end this change is not very usefull, i close.