Bug 18181: Can't tell which subscriptions already have a routing list if seeing all...
authorAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 28 Feb 2017 02:20:01 +0000 (02:20 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 13:51:12 +0000 (13:51 +0000)
To test:
1) Go to Serials -> search for a subscription
2) Add a new routing list for a subscription
3) After saving, you should be redirected to the subscription detail
page
4) Click Serial collection on the left sidebar menu
5) Notice there is a button that says 'Edit routing list' next to this
subscription in the first table
6) Click 'See any subscription attached to this biblio' link
7) Notice it no longer says edit next to this subscription, it says
'Create routing list'
8) Apply patch and refresh page
9) Should now show 'Edit' button like expected

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

serials/serials-collection.pl

index 47d07eb..5182cbd 100755 (executable)
@@ -146,6 +146,7 @@ my $subscriptionidlist="";
 foreach my $subscription (@$subscriptiondescs){
   $subscriptionidlist.=$subscription->{'subscriptionid'}."," ;
   $biblionumber = $subscription->{'bibnum'} unless ($biblionumber);
+  $subscription->{'hasRouting'} = check_routing($subscription->{'subscriptionid'});
 }
 
 chop $subscriptionidlist;