Created attachment 6314 [details] error If you choose to import all from a staged file you can only have 1 items per line item - you cannot at this time modify the quantity, if you try by clicking on modify it says you can't do it.
Created attachment 17521 [details] [review] proposed patch Hello Nicole, I don't know if my patch responds to your problem. Because it depends on the syspref 'AcqCreateItem'. If not I'll create a new bug report. Thx
Created attachment 17522 [details] [review] proposed patch
Patch made for Rennes 2. I will test it ;-)
Christophe, your patch is made for AcqCreateItem = on receive. Don't you think it could also be useful for ppl using AcqCreateItem = on cataloguing? For me the current behavior is good only if you create items when you order... M. Saby
Hi Mathieu, no, in fact the patch shows the warning, and prohibits to add items in one case => AcqCreateItem = placing.. So, about the other two cases there is no warning, no prohibition.
Sorry, I did not read it well. I'm going to test. Mathieu
Created attachment 17678 [details] [review] [PATCH 1/1][SIGNED OFF] bug 7228 : can't add items in an order with Modify
(In reply to comment #7) > Created attachment 17678 [details] [review] [review] > [PATCH 1/1][SIGNED OFF] bug 7228 : can't add items in an order with Modify hmmm, i think we need a test plan here, so qa-team can test this properly... can we get a test plan please, before QA?
Here is the test I made for signing off : after applying the patch - syspref AcqCreateItem : create items on receiving - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on cataloguing - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on receiving - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch M. Saby
wrong copy/paste... Here is the test I made for signing off : after applying the patch - syspref AcqCreateItem : create items on RECEIVING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on CATALOGING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on ORDERING - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch M. Saby
Created attachment 17831 [details] [review] [PASSED QA] Bug 7228: can't add items in an order with Modify We have a message if we want to add items and we can't add, substract only. It's ok if we choose to create items on ordering, in this case koha can't add items, just substract and in this case we have to delete manually the items(s) in the catalog. But if via the syspref AcqCreateItem we choose to create items when receiving this limitation is not usefull The patch just checks if the syspref AcqCreateItem is on 'ordering' if not the message is not shown and we can add items Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Here is the test I made for signing off : after applying the patch - syspref AcqCreateItem : create items on RECEIVING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on CATALOGING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on ORDERING - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Copied test plan from bug report. Template only change deactivating the Javascript that blocks you from changing the quantity when AcqCreateItem is set to something else than 'ordering'. Passes all tests and QA script.
Created attachment 17832 [details] [review] [PASSED QA] Bug 7228: can't add items in an order with Modify We have a message if we want to add items and we can't add, substract only. It's ok if we choose to create items on ordering, in this case koha can't add items, just substract and in this case we have to delete manually the items(s) in the catalog. But if via the syspref AcqCreateItem we choose to create items when receiving this limitation is not usefull The patch just checks if the syspref AcqCreateItem is on 'ordering' if not the message is not shown and we can add items Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Here is the test I made for signing off : after applying the patch - syspref AcqCreateItem : create items on RECEIVING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on CATALOGING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on ORDERING - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Copied test plan from bug report. Template only change deactivating the Javascript that blocks you from changing the quantity when AcqCreateItem is set to something else than 'ordering'. Passes all tests and QA script.
The patch works and solves an existing problem, so I am passing QA on it. What worries me a little is that there is no way to know if the AcqCreateItem setting was changed between creating the order initially and trying to modify it. Maybe a better way would be to check if there are actually items linked to this order to determine if you can add more or not.
Hello Katrin, you are right, my patch is just a quick way to solve only a part of the problem. I haven't thought at the case someone change the syspref after creating a line. Your idea about looking for items created in aqorders_items would be more safe. But I think it would be better to add to this page the creation of each new item, the same job done when you create the order. But it needs more time to do so.
Yes, maybe it could be improved later, but at present all libraries using AcqCreateItem = on receive and importing records from a vendor are very worried, so Christophe's patch will be a good thing for them. Mathieu
Hi Christophe and Mathieu, no worries - I agree that this patch should go in as it is now. It might be worthwile to refactor all this code sometime, but certainly not shortly before a major release :)
This patch has been pushed to master and 3.12.x.
Does not apply to 3.10.x
Created attachment 18129 [details] [review] patch rebased for 3.10.x
Created attachment 18130 [details] [review] patch rebased for 3.8.x Hi Chris, I have made two patches for 3.8 and 3.10. I have added a line in the comment to distinguish each one thx
Thanks, will test and push them now
Pushed to 3.10.x and 3.8.x will be in 3.10.6 and 3.8.13
The problem I reported was the one thing that this patch doesn't fix: - syspref AcqCreateItem : create items on ORDERING - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch If I want to order from a staged file I should be able to add multiple copies even if I'm doing the item at the time of ordering. Otherwise what's the benefit? Nicole
Hi Nicole, maybe you could open a new bug for this and link them? I know that this was your bug and the fix didn't fix your problem, but it might be less confusing. Bugs with lots of comments are hard to work with and we could state clearly that the next development will be for AcqCreateItem = on order.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10501 created