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.
Created attachment 6743 [details] [review] new proposed patch easy to test... thx
Created attachment 6762 [details] [review] Signed off patch
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.
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
Created attachment 7160 [details] to clone
Created attachment 7161 [details] ddl are not duplicated
Created attachment 7162 [details] to clone
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..
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.
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
Created attachment 7375 [details] 2 clones plus changes
Created attachment 7376 [details] 3 clones
hmm..cannot reproduce it either? anymore (current master)?
QA Comment: Code looks good. Marking as Passed QA. Relevance depends on value of AcqCreateItem.
This patch has been pushed, I also tested with AcqCreateItem=recieve, it works well
This fix was included in the 3.6.x branch prior to 3.6.4.