Bug 7358 - basket.pl : it is possible to affect a closed basket to a closed basketgroup
Summary: basket.pl : it is possible to affect a closed basket to a closed basketgroup
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.12
Hardware: All All
: P3 normal (vote)
Assignee: Jonathan Druart
QA Contact: Paul Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 14:17 UTC by laurenthdl
Modified: 2014-05-26 21:04 UTC (History)
7 users (show)

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


Attachments
proposed patch. (1.12 KB, patch)
2011-12-14 15:10 UTC, laurenthdl
Details | Diff | Splinter Review
Bug 7358: reaffect a closed basket to a closed basketgroup (5.40 KB, patch)
2012-08-22 11:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7358: reaffect a closed basket to a closed basketgroup (5.74 KB, patch)
2012-11-02 13:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 7358: reaffect a closed basket to a closed basketgroup (5.76 KB, patch)
2012-11-08 17:48 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description laurenthdl 2011-12-14 14:17:56 UTC
When affecting a closed basket to a basketgroup, the list shows all the basketgroup, even closed basketgroups.
Comment 1 laurenthdl 2011-12-14 15:10:37 UTC Comment hidden (obsolete)
Comment 2 Francois Charbonnier 2011-12-14 16:52:13 UTC
It doesn't work.

This is how I tested :

1/ i created 2 new baskets with one order line in each.

2/ for the first one, I created a basket group and closed it. I let the second one "free"

3/ I opened a new basket group.

4/ I can see it in the basket group list in the basket page.

5/ But, if I'm on the first basket pag,e I can't see the basket group, this basket is in. Even if it's close, for a specific basket, I should get this info. But, all I have in the list is : "Add new group" and "no group".
Comment 3 Jonathan Druart 2012-08-22 11:37:44 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-11-02 13:59:38 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2012-11-02 14:00:33 UTC
Tested, closed groups no longer selectable and are marked as closed!
Comment 6 Paul Poulain 2012-11-08 17:47:32 UTC
QA comment:
 * introduces new string  "(closed)"
 * passes koha-qa.pl
 * fixes an annoying problem, even if an unfrequent one

Overall:
 * passed QA
 * should wait for 3.10.1
Comment 7 Paul Poulain 2012-11-08 17:48:08 UTC
Created attachment 13316 [details] [review]
Bug 7358: reaffect a closed basket to a closed basketgroup

The list of basketgroups when looking at a closed basket show all the
basketgroups.
It should not be possible to affect a basket to a closed basketgroup,
since this basketgroup should have been sent to a supplier.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 8 Jared Camins-Esakov 2012-11-10 01:30:44 UTC
I just tested this and was successfully able to add a closed basket to a closed basketgroup both before and after applying the patch.
Comment 9 Paul Poulain 2012-11-12 07:56:41 UTC
(In reply to comment #8)
> I just tested this and was successfully able to add a closed basket to a
> closed basketgroup both before and after applying the patch.

Could you detail what you did, because I tested and had no problem
Comment 10 Jared Camins-Esakov 2012-11-12 13:18:32 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I just tested this and was successfully able to add a closed basket to a
> > closed basketgroup both before and after applying the patch.
> 
> Could you detail what you did, because I tested and had no problem

1) Created a new basket.
2) Created a new basketgroup for that basket.
3) Closed the basket.
4) Closed the basketgroup.
5) Created a new basket.
6) Closed the new basket.
7) Viewed this new basket, and changed its basketgroup to the basketgroup I had previously created and closed.
Comment 11 Jonathan Druart 2012-11-12 14:58:10 UTC
(In reply to comment #10)
> 7) Viewed this new basket, and changed its basketgroup to the basketgroup I
> had previously created and closed.

I can't reproduce it neither.

At the last step, when I am on the basket detail page (acqui/basket.pl?basketno=XX), the toolbar has 2 buttons ("Reopen this basket" and "Export this basket as CSV") and there is a  "Basket group" dropdown list on the right, with 3 options : "no group", "add new group" and "my new basketgroup (closed)". The last one is disabled and cannot be selected
Comment 12 Jared Camins-Esakov 2012-11-12 15:01:28 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > 7) Viewed this new basket, and changed its basketgroup to the basketgroup I
> > had previously created and closed.
> 
> I can't reproduce it neither.
> 
> At the last step, when I am on the basket detail page
> (acqui/basket.pl?basketno=XX), the toolbar has 2 buttons ("Reopen this
> basket" and "Export this basket as CSV") and there is a  "Basket group"
> dropdown list on the right, with 3 options : "no group", "add new group" and
> "my new basketgroup (closed)". The last one is disabled and cannot be
> selected

Did my earlier steps match the expected workflow?
Comment 13 Jonathan Druart 2012-11-12 15:26:18 UTC
(In reply to comment #12)
> Did my earlier steps match the expected workflow?

Yes! :-/

In fact only a closed basket can be linked to a basketgroup.
You cannot change the basketgroup for a closed basket (unless there is no basketgroup already linked).
You cannot add a basket to a basketgroup already closed.
Comment 14 Jared Camins-Esakov 2012-11-12 15:29:01 UTC
It strikes me the problem might be bug 8892.
Comment 15 Jonathan Druart 2012-11-12 16:13:33 UTC
(In reply to comment #14)
> It strikes me the problem might be bug 8892.

Hum, not sure. It works for me using plack.
Comment 16 Katrin Fischer 2012-11-12 21:54:16 UTC
The patch works for me on current master:

1) Created first order, closed it, attached it to a basket group and closed it.
2) Created second order, closed it, not creating a basket group for it.
3) Tried to changed the basket group, but the closed basket group was greyed out and marked closed.

I am not using Plack - not sure where the problem could be.
Comment 17 Jared Camins-Esakov 2012-11-25 23:30:43 UTC
This patch has been pushed to master.

This time I was able to reproduce the problem and confirm the solution. I'm not sure what I was doing wrong before.
Comment 18 Chris Cormack 2013-04-24 07:26:21 UTC
Pushed to 3.10.x will be in 3.10.6