Bug 10347

Summary: Deactivate "Add item" button when "Add multiple copies" was activated
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, brendan, jean-manuel.broust, jonathan.druart, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
Bug 10347: Scroll down clicking on the "Add multiple copies" button
Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
[SIGNED-OFF] Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button
Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button
[SIGNED-OFF] Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
[SIGNED-OFF] Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button
[PASSED QA] Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated
[PASSED QA] Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button

Description Katrin Fischer 2013-05-27 12:32:54 UTC
It happens often that when trying to add multiple items after entering the number the form is accidentally submitted with "Add item". This way you have to start all over to add your multiple copies as it's not possible to duplicate existing items. 

I think it would be nice, if the "add item" button could be deactivated on entering a number of copies into the field for multiple items.
Comment 1 Owen Leonard 2013-08-15 19:13:38 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2013-08-15 20:57:57 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-08-16 10:37:54 UTC
QA comment:

Owen, the label is wrong. Currently, the "add multiple copies" does not add additional copies but the total amount of items.
e.g. if I enter 3, it adds the first item + 2 copies. Following your test plan, it should 1 + 3 copies.

I will provide a followup in order to scroll at bottom after clicking on the "add multiple copies" button.

Marked as Failed QA.
Comment 4 Jonathan Druart 2013-08-16 10:38:05 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2013-08-16 12:49:05 UTC
(In reply to Jonathan Druart from comment #3)
> e.g. if I enter 3, it adds the first item + 2 copies. Following your test
> plan, it should 1 + 3 copies.

Are you sure? I definitely get 1 + 3 copies.
Comment 6 Nicole C. Engard 2013-08-16 13:34:55 UTC
That's not how it has worked for me in the past - it has only added the number in the box ... so that might be a bug.
Comment 7 Owen Leonard 2013-08-16 14:13:29 UTC
(In reply to Owen Leonard from comment #5)
> Are you sure? I definitely get 1 + 3 copies.

...and I seem to be the only one for whom this is true. I'll have to do more investigation to find out why.
Comment 8 Owen Leonard 2014-02-19 19:25:49 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2014-02-19 19:27:07 UTC Comment hidden (obsolete)
Comment 10 jmbroust 2014-03-13 10:26:27 UTC
I tested this patch and have two remarks :
- If the barcode entered in the item to duplicate is already used in db it is incremented and so are the multiple items duplicated (no duplicate warning);
- why is barcode created if system preference 'autobarcode' is turned to off ?
Comment 11 Katrin Fischer 2014-03-13 11:24:33 UTC
Hm, just read your comment and would like to say that our libraries are not using autobarcode, but they still see it as kind of a nice feature that the barcoe incremrents when adding multiple. They are using barcode schemas not available in autobarcode, but it still works for them.
Comment 12 Owen Leonard 2014-03-13 23:27:09 UTC
(In reply to jmbroust from comment #10)

> - If the barcode entered in the item to duplicate is already used in db it
> is incremented and so are the multiple items duplicated (no duplicate
> warning);
> - why is barcode created if system preference 'autobarcode' is turned to off
> ?

Are these regressions caused by this patch or could they be put into separate bugs?
Comment 13 Jonathan Druart 2016-03-07 10:35:22 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2016-03-07 10:35:26 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2016-03-07 10:35:42 UTC
Patches rebased.
Comment 16 Bernardo Gonzalez Kriegel 2016-04-04 19:18:02 UTC
Applying: Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Comment 17 Jonathan Druart 2016-04-05 06:02:08 UTC
I forgot to obsolete the first patch.
Comment 18 Bernardo Gonzalez Kriegel 2016-04-05 11:21:52 UTC Comment hidden (obsolete)
Comment 19 Bernardo Gonzalez Kriegel 2016-04-05 11:22:00 UTC Comment hidden (obsolete)
Comment 20 Katrin Fischer 2016-04-05 22:25:47 UTC
Created attachment 49934 [details] [review]
[PASSED QA] Bug 10347 - Deactivate "Add item" button when "Add multiple copies" was activated

When the "Add multiple items" button is pressed the other submit buttons
should be hidden in order to eliminate confusion about which button
submits the form at that stage in the process.

This patch alters the form so that clicking the "add multiple" button
hides the other two buttons and displays form for submitting the number
of copies to add.

This patch also makes changes to accompanying text in order to make
things (hopefully) clearer. The button text has been changed (again, see
Bug 10346) to "Add multiple copies of this item."

Explanatory text has been added "The barcode you enter will be
incremented for each additional item," because that seemed non-obvious
about the process.

Unrelated change: a section of obsolete JavaScript has been removed.

To test, go to the add/edit items page for a new or existing record.
Test adding a single item, adding & duplicating, and adding multiple.
The add multiple form should be shown upon clicking 'add multiple,' and
hidden when 'cancel' is clicked.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Work as described, tried adding one, one & dup, multiple and cancel multiple
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Katrin Fischer 2016-04-05 22:27:50 UTC
Created attachment 49935 [details] [review]
[PASSED QA] Bug 10347 [Follow-up] Scroll down clicking on the "Add multiple copies" button

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Brendan Gallagher 2016-04-27 16:27:21 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!