In table aqorders there is the fiedl 'aqorders.subscriptionid'. It is present because during creation of a basket if you add an order from a subscription, you register subscriptionid into aqorders.subscriptionid. But when I try to change data (price, change ratio, etc.) of order, using acqui/parcel.pl, the link to order doesn't send the subscriptionid param. So the value of subscriptionid is deleted in aqorders table and the connection is lost. The problem is described in the pdf file here attached and in this e-mail thread: https://lists.katipo.co.nz/pipermail/koha/2017-July/048475.html Probably we need: 1) A new C4::Acquisition function that gives suscriptionid connect with a specific odernumber 2)Changes in acqui/parcel.pl and in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
Created attachment 65457 [details] Documentation of the bug
Comment on attachment 65457 [details] Documentation of the bug Pdf file written by Paul Pandian, pandian@imsc.res.in
The BULAC (http://www.bulac.fr/) would like to sponsor this development ! As long as “Change sponsored?” is set on “Seeking developer”, anyone wanting to quote us for the development of such a feature or just ask for more information is welcome to write to us: <sigb@bulac.fr>.
Created attachment 74275 [details] [review] Bug 19030: Preserve link between order and subscription when editing an order The aqorders.subscriptionid info is not sent to the template when the order is edited. Which means we lose this link. Test plan: Create an order from a subscription Edit the order => Without this patch, the aqorders.subscriptionid value is set to NULL and items are created when receiving serial. => With this patch applied the link is preserved and expected behaviors are preserved during all the acquisition workflow
The link between aqorder and subscription is now correctly kept when modifying the order but, if it's not the first order on this subscription, the modification always reset the different "Price" & "Note" fields to the values of the previous order. This is a problem I don't have on master branch.
Good testing, Severine!
Created attachment 74285 [details] [review] Bug 19030: Preserve link between order and subscription when editing an order The aqorders.subscriptionid info is not sent to the template when the order is edited. Which means we lose this link. Test plan: Create an order from a subscription Edit the order => Without this patch, the aqorders.subscriptionid value is set to NULL and items are created when receiving serial. => With this patch applied the link is preserved and expected behaviors are preserved during all the acquisition workflow
(In reply to Katrin Fischer from comment #6) > Good testing, Severine! Indeed! :)
Still wrong
Created attachment 74313 [details] [review] Bug 19030: Preserve link between order and subscription when editing an order The aqorders.subscriptionid info is not sent to the template when the order is edited. Which means we lose this link. Test plan: Create an order from a subscription Edit the order => Without this patch, the aqorders.subscriptionid value is set to NULL and items are created when receiving serial. => With this patch applied the link is preserved and expected behaviors are preserved during all the acquisition workflow You should also try and create several orders from the same subscription
Hi Jonathan, I failed when I try to apply it : $ git bz apply 19030 Bug 19030 - Link order <-> subscription is lost when an order is edited 74313 - Bug 19030: Preserve link between order and subscription when editing an order Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 19030: Preserve link between order and subscription when editing an order Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt Failed to merge in the changes. Patch failed at 0001 Bug 19030: Preserve link between order and subscription when editing an order The copy of the patch that failed is found in: /var/repositories/koha/.git/rebase-apply/patch
Séverine, the patch conflicts with bug 20365, so I decided to write this one on top of it. I have forgotten to add the dependency.
Created attachment 74378 [details] [review] Bug 19030: Preserve link between order and subscription when editing an order The aqorders.subscriptionid info is not sent to the template when the order is edited. Which means we lose this link. Test plan: Create an order from a subscription Edit the order => Without this patch, the aqorders.subscriptionid value is set to NULL and items are created when receiving serial. => With this patch applied the link is preserved and expected behaviors are preserved during all the acquisition workflow You should also try and create several orders from the same subscription Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
I tried different kind of subscriptions and didn't notice weird behaviour this time.
Does this really need to depend on bug 20365 ?
Created attachment 74603 [details] [review] Bug 19030: Preserve link between order and subscription when editing an order The aqorders.subscriptionid info is not sent to the template when the order is edited. Which means we lose this link. Test plan: Create an order from a subscription Edit the order => Without this patch, the aqorders.subscriptionid value is set to NULL and items are created when receiving serial. => With this patch applied the link is preserved and expected behaviors are preserved during all the acquisition workflow You should also try and create several orders from the same subscription Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(In reply to Julian Maurice from comment #15) > Does this really need to depend on bug 20365 ? I decided that it doesn't need to. This one fixes a bug, and bug 20365 is an enhancement that still needs some work. I rebased the patch on master (without 20365), and signed off it. Passed QA
(Sponsored-by: BULAC - http://www.bulac.fr will be added when pushing this patch)
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.6
Pushed to 17.05.x for v17.05.12