Bug 22237: Subscriptions are not linked to Mana upon edit
authorOwen Leonard <oleonard@myacpl.org>
Wed, 30 Jan 2019 17:13:35 +0000 (17:13 +0000)
committerroot <root@f1ebe1bec408>
Fri, 15 Mar 2019 11:34:03 +0000 (11:34 +0000)
This patch modifies C4/Serials.pm so that during the process of editing
a subscription a link to Mana can be created.

To test, apply the patch and go to Serials.

 - Locate a subscription which was not created using Mana data but which
   can be found in Mana.
 - Edit the subscription, skipping to the second page.
 - View the results returned by Mana and select one.
 - Save the subscription.
 - Upon being redirected to the subscription detail page you should see
   a "Report mistake" button. This shows that the subscription has been
   linked to Mana successfully.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

C4/Serials.pm

index 66c1f90..f8c17b9 100644 (file)
@@ -1308,7 +1308,7 @@ sub ModSubscription {
     $biblionumber, $callnumber, $notes, $letter, $manualhistory,
     $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
     $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq,
-    $itemtype, $previousitemtype
+    $itemtype, $previousitemtype, $mana_id
     ) = @_;
 
     my $dbh   = C4::Context->dbh;
@@ -1321,7 +1321,7 @@ sub ModSubscription {
             callnumber=?, notes=?, letter=?, manualhistory=?,
             internalnotes=?, serialsadditems=?, staffdisplaycount=?,
             opacdisplaycount=?, graceperiod=?, location = ?, enddate=?,
-            skip_serialseq=?, itemtype=?, previousitemtype=?
+            skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=?
         WHERE subscriptionid = ?";
 
     my $sth = $dbh->prepare($query);
@@ -1335,7 +1335,7 @@ sub ModSubscription {
         $letter,          ($manualhistory ? $manualhistory : 0),
         $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
         $graceperiod,     $location,       $enddate,        $skip_serialseq,
-        $itemtype,        $previousitemtype,
+        $itemtype,        $previousitemtype, $mana_id,
         $subscriptionid
     );
     my $rows = $sth->rows;