Bug 23114 - Inventory: allow to scan barcodes into input field
Summary: Inventory: allow to scan barcodes into input field
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matthias Meusburger
QA Contact: Katrin Fischer
URL:
Keywords:
: 23755 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-13 09:27 UTC by Matthias Meusburger
Modified: 2021-12-13 21:10 UTC (History)
8 users (show)

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


Attachments
Bug 23114 - Inventory: allow to scan barcodes (9.99 KB, patch)
2019-06-26 13:04 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23114 - Inventory: allow to scan barcodes (10.15 KB, patch)
2019-10-04 07:34 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23114 - Inventory: allow to scan barcodes (10.17 KB, patch)
2020-09-25 20:48 UTC, David Nind
Details | Diff | Splinter Review
Bug 23114: Inventory: allow to scan barcodes (10.22 KB, patch)
2020-09-26 18:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23114: (QA follow-up) Slightly rephrase message when both barcode options are used (1.29 KB, patch)
2020-09-26 18:37 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2019-06-13 09:27:07 UTC
Currently, in the inventory tool, the user can upload a file containing barcodes.

It would be nice for the user to be able to scan barcodes as well, like in other tools (batch item modification, for example).
Comment 1 Matthias Meusburger 2019-06-26 13:04:36 UTC
Created attachment 91020 [details] [review]
Bug 23114 - Inventory: allow to scan barcodes

This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.
Comment 2 George Williams (NEKLS) 2019-07-19 21:07:27 UTC
I can still upload the barcode file.
I can scan/enter barcodes in the textarea.
I get a warning when I try to upload a file and enter barcodes scanned in the text area.
I can proceed to the next step in both cases.

But once I proceed to the next step, the uploaded file works with the inventory tool as expected.  The scanned barcodes do not - it's as if I uploaded a text file with no data in it.
Comment 3 Eric Bégin 2019-10-04 07:26:39 UTC
Applying: Bug 23114 - Inventory: allow to scan barcodes
Using index info to reconstruct a base tree...
M	tools/inventory.pl
Falling back to patching base and 3-way merge...
Auto-merging tools/inventory.pl
CONFLICT (content): Merge conflict in tools/inventory.pl
Comment 4 Matthias Meusburger 2019-10-04 07:34:42 UTC
Created attachment 93667 [details] [review]
Bug 23114 - Inventory: allow to scan barcodes

This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.
Comment 5 Matthias Meusburger 2019-10-04 07:35:04 UTC
Patch rebased.
Comment 6 Eric Bégin 2019-10-04 09:02:49 UTC
When I import the file, I get 2 messages :

[3 items modified : datelastseen set to 10/05/2019]

[Number of potential barcodes read: 3]

I don't get any of those messages using the scanned barcodes.
Comment 7 Matthias Meusburger 2020-03-24 15:27:54 UTC
*** Bug 23755 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Meusburger 2020-06-17 14:57:17 UTC
Thanks for the feedback Eric.

I just tested this again on master, and I get both "datelastseen set to" and "Number of potential barcodes read" messages whether I use file upload or barcode scan.

Could you please test it again, and be more specific about the options you used to make it fail?

Thanks
Comment 9 David Nind 2020-09-25 20:48:08 UTC
Created attachment 110773 [details] [review]
Bug 23114 - Inventory: allow to scan barcodes

This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2020-09-25 20:51:19 UTC
(In reply to Matthias Meusburger from comment #8)
> Thanks for the feedback Eric.
> 
> I just tested this again on master, and I get both "datelastseen set to" and
> "Number of potential barcodes read" messages whether I use file upload or
> barcode scan.
> 
> Could you please test it again, and be more specific about the options you
> used to make it fail?
> 
> Thanks

I managed to replicate Eric's behavour - doing a flush_memcached and restart_all (on koha-testing-docker) after applying the patch and clearing the browser cache solved this for me.
Comment 11 Katrin Fischer 2020-09-26 18:37:32 UTC
Created attachment 110793 [details] [review]
Bug 23114: Inventory: allow to scan barcodes

This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2020-09-26 18:37:36 UTC
Created attachment 110794 [details] [review]
Bug 23114: (QA follow-up) Slightly rephrase message when both barcode options are used

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2020-10-01 09:44:20 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass 2020-10-20 17:55:44 UTC
enhancement will not be backported to 20.05.x