Bug 7338

Summary: link to serial detail wrong
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: SerialsAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: normal    
Priority: P3 CC: paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=5427
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: subscription # links
screenshot of record with more than 1 subscription and manipulated URL
Bug 7338: Link on serial collection page wrong
Proposed patch
[SIGNED-OFF] Bug 7338: Link on serial collection page wrong
Bug 7338: Follow up: show link only when there is more than 1 subscription
Signed-off follow-up patch
[SIGNED-OFF] Bug 7338 Links on Serial Collection page

Description Nicole C. Engard 2011-12-08 16:46:00 UTC
Created attachment 6672 [details]
subscription # links

When on this page: /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=5427 if you click the serial # at the top it takes you to the detail which I think is right. But if you click the serial # next to the issue history it just refreshes the page you're on.
Comment 1 Katrin Fischer 2011-12-09 06:38:44 UTC
Created attachment 6688 [details]
screenshot of record with more than 1 subscription and manipulated URL

It's a scoping problem, but I made an interesting find:

http://localhost:8080/cgi-bin/koha/serials/serials-collection.pl?biblionumber=1

If you have more than one subscription for that record and you add the biblionumber of the subscription to the URL instead of the subscriptionid, 
you get an overview of your entire serial collection for that record.

Why do we never link this page like this? Am I missing something?

Will send a patch to fix the scoping problem.
Comment 2 Katrin Fischer 2011-12-09 06:45:05 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2011-12-09 07:35:27 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2011-12-09 17:50:57 UTC
Why are there two patches?  I'm going to test the first one which was Katrin's
Comment 5 Nicole C. Engard 2011-12-09 17:52:32 UTC Comment hidden (obsolete)
Comment 6 Nicole C. Engard 2011-12-09 17:53:14 UTC
Signed off on Katrin's patch. Please let me know what the second patch was for.
Comment 7 Katrin Fischer 2011-12-09 18:11:07 UTC
I think Frederic and me discovered a hidden feature while trying to fix this bug. I will try to investigate / test it a bit more this weekend.
Comment 8 Katrin Fischer 2011-12-12 07:46:43 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2011-12-12 07:47:52 UTC
Hi Nicole,
sorry for causing confusion and thx for your sign-off. Could you take a look at those both patches together? It should make available some nice new functionality for records with more than 1 subscription!
Comment 10 Frédéric Demians 2011-12-12 09:02:20 UTC
Created attachment 6717 [details] [review]
Signed-off follow-up patch

It works. With this patch, on Serials Collection page, the link, 'See any
subscription attached to this biblio' appears only when there are more than one
subscription attached to the biblio record.

Kait: You haven't attach my patch with your sign-off.
Comment 11 Katrin Fischer 2011-12-12 09:09:46 UTC
Hi Frederic, thx for signing off. Your patch works great as well - I will replace the attached patch with a signed off one tonight.
Comment 12 Katrin Fischer 2011-12-13 07:19:40 UTC
Created attachment 6733 [details] [review]
[SIGNED-OFF] Bug 7338 Links on Serial Collection page

Don't display link to the serial, when the collection page displays just
one subscription. Display it when several subscriptions. Alway display a
link for displaying biblio record other subscriptions.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely, but always shows link to 'any subscriptions'.
I did a follow-up so the link would only show if there was more
than 1 subscription for the record.
Comment 13 Ian Walls 2012-01-05 13:20:13 UTC
Works as advertised, template-based change (with a bit of logic in the script to send new param values).  Patches must be applied in REVERSE ORDER than currently listed.

Passed QA
Comment 14 Paul Poulain 2012-01-06 14:16:30 UTC
patch pushed please test:

QA comment:
prove xt/author/valid-templates.t 
xt/author/valid-templates.t .. ok