Bug 15061 - Can't add item to rotating collection
Summary: Can't add item to rotating collection
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 11:43 UTC by Josef Moravec
Modified: 2017-06-14 22:11 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
rotating collection issue (23.65 KB, image/png)
2015-10-27 09:03 UTC, Josef Moravec
Details
Steps to reproduce error message (without plack) (140.23 KB, image/png)
2015-11-02 07:55 UTC, Marc Véron
Details
Bug 15061: Can't add item to rotating collection (2.07 KB, patch)
2015-11-03 15:24 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 15061: Can't add item to rotating collection (2.24 KB, patch)
2015-11-03 15:50 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 15061: Can't add item to rotating collection (2.31 KB, patch)
2015-11-03 23:46 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 Josef Moravec 2015-10-26 11:43:34 UTC
Everytime you enter barcode to add it to rotating collection, you get an error message: "Failed to add item with barcode xxx: NO_ID"

Also, in empty collection you see table with items, but only with one empty row...
Comment 1 Jonathan Druart 2015-10-27 08:57:25 UTC
Josef,
It looks good here: http://test-intra.plack.bywatersolutions.com/cgi-bin/koha/rotating_collections/addItems.pl
Could you please detail your issue?
Comment 2 Josef Moravec 2015-10-27 09:03:08 UTC
Created attachment 44044 [details]
rotating collection issue

I'm adding a screenshot of the problem I'm facing
Comment 3 Josef Moravec 2015-10-27 09:05:36 UTC
I understand now, when I created a new collection, I tried to add items and somehow was redirected on page addItems without colId parameter... so of course adding items failed...
Comment 4 Jonathan Druart 2015-10-27 09:15:33 UTC
Please provide a step by step plan to reproduce, I don't get it.
Comment 5 Josef Moravec 2015-10-27 11:12:07 UTC
I can't reproduce it now as well... the problem was, I think, that collection ID was lost... but only one way I can reproduce it now is to manually go to address /cgi-bin/koha/rotating_collections/addItems.pl without any parameter... but it's not the way used by normal work....
Comment 6 Marc Véron 2015-11-02 07:55:37 UTC
Created attachment 44287 [details]
Steps to reproduce error message (without plack)

I can reproduce the issue in two steps (without plack):

1) Call /cgi-bin/koha/rotating_collections/addItems.pl without param
   Result: 
       Screen to add items. 
       Warning in intranet-error.log: Use of unitialized value in string eq
       at (...)adItems.pl line 42

   Expected result: Should display an error message

2) Try to add an item
   Result: 
       Displays error message:
       Failed to add item with barcode XXXX:
       NO_ID

See screenshots attached.
 

See screenshot.
Comment 7 Bernardo Gonzalez Kriegel 2015-11-03 15:24:21 UTC Comment hidden (obsolete)
Comment 8 Marc Véron 2015-11-03 15:50:20 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-11-03 23:46:57 UTC
Created attachment 44348 [details] [review]
[PASSED QA] Bug 15061: Can't add item to rotating collection

This patch prevents adding items to invalid (empty)
rotating collection id

To test:
1) Go to /cgi-bin/koha/rotating_collections/addItems.pl
2) Try to add an item, you get error show in attached pictures
3) Apply the patch
4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl
5) Can't add any items

I don't know if this is a real problem

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Tomás Cohen Arazi 2015-11-04 14:02:08 UTC
Patch pushed to master.

Thanks Bernardo!
Comment 11 Frédéric Demians 2015-11-29 20:07:13 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 12 Liz Rea 2016-01-06 21:06:29 UTC
Pushed to 3.18.13, and released.