Bug 21880

Summary: "Relationship information" disappears when accessing paginated results in authority searches
Product: Koha Reporter: Andreas Roussos <arouss1980>
Component: MARC Authority data supportAssignee: Andreas Roussos <arouss1980>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P3 CC: lucas, m.de.rooy, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
URL: authorities/auth_finder.pl
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21453    
Attachments: Bug 21880: "Relationship information" disappears when accessing paginated results in authority searches
Cataloging authority plugin search in page 1 of results
Cataloging authority plugin search in page 2 of results
Bug 21880: "Relationship information" disappears when accessing paginated results in authority searches
Bug 21880: (follow-up) Add some uri filters

Description Andreas Roussos 2018-11-23 17:35:02 UTC
In the Staff client (under Home > Authorities), edit an authority
and try to link it with another authority: if your search returns
more than 20 results, the Relationship information section of the
Authority search window disappears when you click the pagination
hyperlinks.
Comment 1 Andreas Roussos 2018-11-23 17:43:34 UTC
Created attachment 82619 [details] [review]
Bug 21880: "Relationship information" disappears when accessing paginated results in authority searches

When linking authorities with authorities, if you perform a
search that returns >20 results, the "Relationship information"
section disappears when you click on the pagination hyperlinks.

This patch fixes that.

Test plan:
1) In the Authorities module, edit an authority (or create a new
   one) and try to link it with another authority (via UNIMARC
   500$a, for example).
2) When the authority finder comes up, search for something that
   will yield more than 20 results, then click on the pagination
   links -- notice how the "Relationship information" section is
   no longer visible.
3) Apply the patch (and restart Plack/memcached, if necessary).
4) Repeat step 2) -- "Relationship information" is now persistent.
Comment 2 Marcel de Rooy 2018-11-26 12:51:36 UTC
Looking here
Comment 3 Marcel de Rooy 2018-11-26 13:05:29 UTC
Related bug?
If I have resultsperpage==2 and 3 hits, I see 2 hits on first page and 2 hits on second page..
Comment 4 Marcel de Rooy 2018-11-26 13:10:15 UTC
I am trying to reproduce this under MARC21 with 400 but somehow i do not succeed to. Please clarify.
Comment 5 Andreas Roussos 2018-11-26 16:43:08 UTC
(In reply to Marcel de Rooy from comment #3)
> Related bug?
> If I have resultsperpage==2 and 3 hits, I see 2 hits on first page and 2
> hits on second page..
Confirmed, good catch! Unfortunately, I don't know how to fix what
you observed. FWIW, a similar issue has been raised (Bug 21405) to
deal with broken pagination in authorities search via the main page
of authorities (i.e. in Home > Authorities).
Comment 6 Andreas Roussos 2018-11-26 16:52:39 UTC
Created attachment 82649 [details]
Cataloging authority plugin search in page 1 of results
Comment 7 Andreas Roussos 2018-11-26 16:53:04 UTC
Created attachment 82650 [details]
Cataloging authority plugin search in page 2 of results
Comment 8 Andreas Roussos 2018-11-26 16:54:02 UTC
(In reply to Marcel de Rooy from comment #4)
> I am trying to reproduce this under MARC21 with 400 but somehow i do not
> succeed to. Please clarify.
I've set up a sandbox using ByWater Solutions' sandboxes and took
a couple of screenshots for you while trying to link a PERSO_NAME
authority to another authority using MARC21 tag 400. Please find
them attached to this bug report.

Basically, you need to click on the ellipsis (...) next to field
400$a, then search for something that will yield lots of results
(or you can just hit 'Search' without passing any search strings).
Then, if you click on any of the pagination links, you'll see
that the "Relationship information" section is gone.
Comment 9 Marcel de Rooy 2018-12-13 14:37:55 UTC
Created attachment 83173 [details] [review]
Bug 21880: "Relationship information" disappears when accessing paginated results in authority searches

When linking authorities with authorities, if you perform a
search that returns >20 results, the "Relationship information"
section disappears when you click on the pagination hyperlinks.

This patch fixes that.

Test plan:
1) In the Authorities module, edit an authority (or create a new
   one) and try to link it with another authority (via UNIMARC
   500$a, for example).
2) When the authority finder comes up, search for something that
   will yield more than 20 results, then click on the pagination
   links -- notice how the "Relationship information" section is
   no longer visible.
3) Apply the patch (and restart Plack/memcached, if necessary).
4) Repeat step 2) -- "Relationship information" is now persistent.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2018-12-13 14:37:59 UTC
Created attachment 83174 [details] [review]
Bug 21880: (follow-up) Add some uri filters

Theoretically, source needs a filter.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2018-12-13 14:38:31 UTC
(In reply to Andreas Roussos from comment #8)
> (In reply to Marcel de Rooy from comment #4)
> > I am trying to reproduce this under MARC21 with 400 but somehow i do not
> > succeed to. Please clarify.
> I've set up a sandbox using ByWater Solutions' sandboxes and took
> a couple of screenshots for you while trying to link a PERSO_NAME
> authority to another authority using MARC21 tag 400. Please find
> them attached to this bug report.
> 
> Basically, you need to click on the ellipsis (...) next to field
> 400$a, then search for something that will yield lots of results
> (or you can just hit 'Search' without passing any search strings).
> Then, if you click on any of the pagination links, you'll see
> that the "Relationship information" section is gone.

Thx for additional explanation.
Comment 12 Marcel de Rooy 2018-12-13 14:39:19 UTC
Sending this one directly to PQA. Trivial fix adding the source parameter.
Comment 13 Nick Clemens 2018-12-14 15:33:00 UTC
Awesome work all!

Pushed to master for 19.05
Comment 14 Martin Renvoize 2018-12-17 12:08:27 UTC
Pushed to 18.11.x for 18.11.01
Comment 15 Lucas Gass 2018-12-26 19:36:22 UTC
does not apply cleaning to 18.05 please rebase if needed in 18.05