Bug 9236 - deleting an order when receiving redirects to closed basket
Summary: deleting an order when receiving redirects to closed basket
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-06 19:54 UTC by Nicole C. Engard
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9236: FIX delete order when receiving (2.06 KB, patch)
2012-12-11 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9236 : Redirect to the parcel page after deleting an item/order (1.84 KB, patch)
2012-12-12 14:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9236 : Redirect to the parcel page after deleting an item/order (2.56 KB, patch)
2012-12-12 16:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PATCH] Bug 9236: FIX delete order when receiving (2.12 KB, patch)
2012-12-12 16:27 UTC, Mathieu Saby
Details | Diff | Splinter Review
[PATCH] Bug 9236 : Redirect to the parcel page after deleting an item/order (2.62 KB, patch)
2012-12-12 16:33 UTC, Mathieu Saby
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9236: FIX delete order when receiving (2.54 KB, patch)
2013-01-20 21:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9236 : Redirect to the parcel page after deleting an item/order (3.19 KB, patch)
2013-01-20 21:48 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-12-06 19:54:01 UTC
When you're receiving if you click 'Delete' to the right of an order line it redirects you to the closed basket not back to the receiving page where you were.
Comment 1 Jonathan Druart 2012-12-11 13:29:00 UTC Comment hidden (obsolete)
Comment 2 Mathieu Saby 2012-12-12 13:47:02 UTC
I tested the patch : it works, "Delete order" suppress the command line, and "Delete order and catalog record" suppress the command line and the record.

But one point can be improved : After deletion, we are redirected to basket page. I think we should stay in receipt page. It would be much more convenient for staff receiving parcels.

M. Saby
Rennes 2 University
Comment 3 Jonathan Druart 2012-12-12 13:59:50 UTC
Hi Mathieu,

Thanks for testing.

It is not the goal of this patch. The only ambition of this patch is to fix a bug and not to change the previous behaviour.
Comment 4 Jonathan Druart 2012-12-12 14:02:44 UTC
Hum... You are right, it is the subject of the ticket :)
Comment 5 Mathieu Saby 2012-12-12 14:05:11 UTC
I was about to sign it off...
But I realized the problem was described in slighlty different way in this BZ and in Biblibre Mantis.

M. Saby
Comment 6 Jonathan Druart 2012-12-12 14:14:59 UTC Comment hidden (obsolete)
Comment 7 Mathieu Saby 2012-12-12 14:31:31 UTC
I applied the 2 patches. It does not work : I am still redirected to the basket and not to the Receipt Summary.

M. Saby
Comment 8 Jonathan Druart 2012-12-12 14:48:19 UTC
(In reply to comment #7)
> I applied the 2 patches. It does not work : I am still redirected to the
> basket and not to the Receipt Summary.
> 
> M. Saby

Could you confirm me that you are on the acqui/parcel.pl?invoiceid=XXX, you click on the link "Delete order" or "Delete order and catalog record", you confirm the message and you are redirected on acqui/basket.pl?basketno=YYY ?

If yes, could you add a console.log with the string ("addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]") just before the window.location (parcel.tt l.83).

Do you test on a sandbox ?
Comment 9 Mathieu Saby 2012-12-12 15:57:07 UTC
I am on my own VM, rebased to master, but maybe did something wrong...


I am on the page acqui/parcel.pl?invoiceid=8
"Receipt summary for fournisseur1 [ qq ] on 12/12/2012 "...

I have 1 command line (same thing with 2 command lines...): 
basket 7
order line 10
summary	q
qty 1
unit cost 18
order cost 18
fund bu-1-2

I click on "delete order" for this command line.
("addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]")
=
addorder.pl?ordernumber=10&basketno=7&quantity=0&biblionumber=6014&invoiceid=8

And after validation, I arrive on this page :
acqui/basket.pl?basketno=7

M. Saby
Comment 10 Jonathan Druart 2012-12-12 16:04:47 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2012-12-12 16:05:22 UTC
Ooops! I forgot to add a file to the patch, sorry!
Comment 12 Mathieu Saby 2012-12-12 16:27:23 UTC Comment hidden (obsolete)
Comment 13 Mathieu Saby 2012-12-12 16:33:31 UTC Comment hidden (obsolete)
Comment 14 Nicole C. Engard 2012-12-12 16:38:38 UTC
Thanks for this, but the bug I reported was in version 3.8.5 ... and the version has been changed on this.  Is this patch just for 3.10?  Changing the version back to 3.8.

Nicole
Comment 15 Mathieu Saby 2012-12-12 16:45:22 UTC
I am not sure for the version.
We have 2 problems in 3.10, resolved by the 2 patches.

But maybe in 3.8 we have only the pbm resolved by this one : [PATCH] Bug 9236 : Redirect to the parcel page after deleting an item/order 

M. Saby
Comment 16 Katrin Fischer 2013-01-20 21:47:45 UTC
Created attachment 14729 [details] [review]
[SIGNED-OFF] Bug 9236: FIX delete order when receiving

Before this patch the "delete order" links were broken on the receiving
page (parcel.pl)

Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Before applying the patch, when recieving a parcel,
if you delete an order line, Koha tries to open the
page of the basket linked to that order, but can
not find it. Koha displays "Vendor not found".
With the patch, Koha finds the right basket.

I Sign off this patch, to be applied with the other patch ("Redirect to the parcel page after deleting an item/order")

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 17 Katrin Fischer 2013-01-20 21:48:19 UTC
Created attachment 14730 [details] [review]
[SIGNED-OFF] Bug 9236 : Redirect to the parcel page after deleting an item/order

Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) Receive shipment for a previously created basket with
  multiple order lines
2) Verify 'Delete order' links only have 2 parameters and
  when you delete an order, you are not redirected to the
  basket.
3) Verify the same is true for 'Delete order and catalog
  record'.
4) Apply both patches from Bug 9236.
5) Redo tests and verify page redirects correctly now.
  Links now also show the basket number as third parameter.

Also: make sure orders/items and records are deleted correctly.

Passes all tests and QA script.
Comment 18 Jared Camins-Esakov 2013-01-21 13:40:14 UTC
This patch has been pushed to master.
Comment 19 Chris Cormack 2013-02-01 08:19:38 UTC
Pushed to 3.10.x will be in 3.10.3