Bug 7350 - In New order the "+" button duplicates input text but not the "selected" in ddl
Summary: In New order the "+" button duplicates input text but not the "selected" in ddl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.6
Hardware: All All
: P3 normal (vote)
Assignee: Christophe Croullebois
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-13 10:22 UTC by Christophe Croullebois
Modified: 2013-12-05 19:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
new proposed patch (1.91 KB, patch)
2011-12-13 10:36 UTC, Christophe Croullebois
Details | Diff | Splinter Review
Signed off patch (1.91 KB, patch)
2011-12-13 21:33 UTC, Duncan
Details | Diff | Splinter Review
to clone (68.41 KB, image/png)
2012-01-15 13:51 UTC, Christophe Croullebois
Details
ddl are not duplicated (52.61 KB, image/png)
2012-01-15 13:53 UTC, Christophe Croullebois
Details
to clone (63.14 KB, image/png)
2012-01-15 13:54 UTC, Christophe Croullebois
Details
2 clones plus changes (72.30 KB, image/png)
2012-01-28 16:03 UTC, Christophe Croullebois
Details
3 clones (63.37 KB, image/png)
2012-01-28 16:03 UTC, Christophe Croullebois
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Croullebois 2011-12-13 10:22:32 UTC
All in the title...
Due to CloneNode limitation in additem.js.
cloneNode() does not preserve select box selections...
I have made a little function that paste the selected in the clone.
Patch follows.
Thx for testing.
Comment 1 Christophe Croullebois 2011-12-13 10:36:05 UTC Comment hidden (obsolete)
Comment 2 Duncan 2011-12-13 21:33:32 UTC
Created attachment 6762 [details] [review]
Signed off patch
Comment 3 Marcel de Rooy 2012-01-11 12:27:48 UTC
This report misses information to test it well. You say "all is in the title" but that is not sufficient.
Please tell which + do you actually mean? Where?
Under which conditions (syspref values..) can it be tested? I suppose that value of AcqCreateItem for instance is relevant. 

In order to test a report, we should not grep Koha code in order to see where the javascript you change, is called, etc.

Setting status to Failed QA. Please include more information first. Thanks.
Comment 4 Christophe Croullebois 2012-01-15 13:49:05 UTC
Hello M. de Rooy,
sorry...
So I join you two snapshots.
Koha is moving so kickly, no more "+" but now we have "Add"...
So step by step :
1° You create a basket in acqui or you use an active one, no matter.
2° After you choose Add Order To Basket, new, from..., no matter.
3° You fill in "Item" block, all the Drop Down Lists, don't choose the first value.
4° You want a second item, so you clone it with "Add", and as you are lazy, you expect that all your choices will be kept... :o( Only the imput text are kept.
Regards
Comment 5 Christophe Croullebois 2012-01-15 13:51:31 UTC Comment hidden (obsolete)
Comment 6 Christophe Croullebois 2012-01-15 13:53:30 UTC
Created attachment 7161 [details]
ddl are not duplicated
Comment 7 Christophe Croullebois 2012-01-15 13:54:44 UTC
Created attachment 7162 [details]
to clone
Comment 8 Marcel de Rooy 2012-01-16 11:25:52 UTC
Thanks for clarifying.

Please note that your patch only is relevant when AcqCreateItem is set to "When ordering". (And some people may not exactly have your pref values ;)

When I haved added one item, your patch copies the values of the combo boxes in the new item. So that is OK.
But when I want to add another item by clicking the second Add button, nothing seems to happen? Could you verify please? Note that this may probably be not related to your code, but if we change this code and could resolve this too, that would be great..
Comment 9 Christophe Croullebois 2012-01-16 12:45:27 UTC
Hello M. de Rooy,
thx, oups, you'r right, we need "AcqCreateItem" to test...
For the second clone failure, I 'll see, I think too, even if it is not due to my patch it would be better to solve with it.
So I'll propose a new patch with the correction about this problem.
Comment 10 Christophe Croullebois 2012-01-28 16:01:28 UTC
Hello M. de Rooy,
I have tested as you said, but can't reproduce the bug.
I join two snapshots, for me it's ok, the third clone herits of its parent's content, and of course the link "add" is active for me.
I have no idea why it's not the same for you.
Another test ?
thx
Comment 11 Christophe Croullebois 2012-01-28 16:03:08 UTC
Created attachment 7375 [details]
2 clones plus changes
Comment 12 Christophe Croullebois 2012-01-28 16:03:50 UTC
Created attachment 7376 [details]
3 clones
Comment 13 Marcel de Rooy 2012-01-30 08:23:08 UTC
hmm..cannot reproduce it either? anymore (current master)?
Comment 14 Marcel de Rooy 2012-01-30 08:25:27 UTC
QA Comment: Code looks good. Marking as Passed QA. Relevance depends on value of AcqCreateItem.
Comment 15 Paul Poulain 2012-01-30 21:22:04 UTC
This patch has been pushed, I also tested with AcqCreateItem=recieve, it works well
Comment 16 Jared Camins-Esakov 2012-05-23 12:57:01 UTC
This fix was included in the 3.6.x branch prior to 3.6.4.