Bug 35774 - add_item_to_item_group additem.pl should be $item->itemnumber instead of biblioitemnumber
Summary: add_item_to_item_group additem.pl should be $item->itemnumber instead of bibl...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 33639
Blocks:
  Show dependency treegraph
 
Reported: 2024-01-11 15:29 UTC by Lucas Gass
Modified: 2024-04-26 20:28 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.03,23.05.09


Attachments
Bug 35774: Use itemnumber instead of biblioitemnumber (1.26 KB, patch)
2024-01-12 18:10 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35774: Use itemnumber instead of biblioitemnumber (1.45 KB, patch)
2024-01-17 22:38 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35774: Use itemnumber instead of biblioitemnumber (1.50 KB, patch)
2024-01-18 06:05 UTC, David Nind
Details | Diff | Splinter Review
Bug 35774: Use itemnumber instead of biblioitemnumber (1.59 KB, patch)
2024-01-19 10:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2024-01-11 15:29:38 UTC
Opening this based on a comment in Bug 33639

446                     add_item_to_item_group( $item->biblionumber, $item->biblioitemnumber, $item_group, $item_group_description );

Should it be $item->itemnumber instead of biblioitemnumber here as well?


Looks like this should indeed be $item->itemnumber.
Comment 1 Lucas Gass 2024-01-12 18:10:18 UTC
Created attachment 160994 [details] [review]
Bug 35774: Use itemnumber instead of biblioitemnumber

To test: ( SAME PLAN AS BZ 33639)
Apply patch
1 - Browse to details page for a record
2 - Create or ensure the record has item group(s)
3 - Click New->New item
4 - Note the bottom of the page has a form to attach to existing group
5 - Note when a group is selected the enumchron field is populated
6 - Confirm item is saved to group when saved
Comment 2 David Nind 2024-01-12 20:19:00 UTC
I think I'm missing something for testing this bug.

Should I notice any change in behaviour before and after the patch is applied? Everything seems to work the same for me.

Also, I'm confused about step 5:

1. If you add a new item, put a value to 952$h, then add to a group, then the 952$h shouldn't change. (This is the behaviour I'm seeing.)

OR

2. If existing items have a value in 952$h, then when you add a new item, it should increment?

OR

3. Something else?
Comment 3 Lucas Gass 2024-01-17 22:35:16 UTC
(In reply to David Nind from comment #2)
> I think I'm missing something for testing this bug.
> 
> Should I notice any change in behaviour before and after the patch is
> applied? Everything seems to work the same for me.
> 
> Also, I'm confused about step 5:
> 
> 1. If you add a new item, put a value to 952$h, then add to a group, then
> the 952$h shouldn't change. (This is the behaviour I'm seeing.)
> 
> OR
> 
> 2. If existing items have a value in 952$h, then when you add a new item, it
> should increment?
> 
> OR
> 
> 3. Something else?

David, this is my fault. I attached the wrong test plan.
Comment 4 Lucas Gass 2024-01-17 22:38:14 UTC
Created attachment 161122 [details] [review]
Bug 35774: Use itemnumber instead of biblioitemnumber

With Bug 33639 already pushed to master there should be NO change in behavior.

To test:
1. APPLY PATCH
2. Create one or more item groups for a bib if needed
3. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
4. The item should succesffuly be added to the item group.
5. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
6. Name the new item group.
7. Make sure it is correctly added to the item group.
Comment 5 David Nind 2024-01-18 06:05:43 UTC
Created attachment 161127 [details] [review]
Bug 35774: Use itemnumber instead of biblioitemnumber

With Bug 33639 already pushed to master there should be NO change in behavior.

To test:
1. APPLY PATCH
2. Create one or more item groups for a bib if needed
3. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
4. The item should succesffuly be added to the item group.
5. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
6. Name the new item group.
7. Make sure it is correctly added to the item group.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2024-01-18 06:06:18 UTC
(In reply to Lucas Gass from comment #3)

> David, this is my fault. I attached the wrong test plan.

No problem!

Now signed off.
Comment 7 Marcel de Rooy 2024-01-19 10:17:38 UTC
Created attachment 161182 [details] [review]
Bug 35774: Use itemnumber instead of biblioitemnumber

With Bug 33639 already pushed to master there should be NO change in behavior.

To test:
1. APPLY PATCH
2. Create one or more item groups for a bib if needed
3. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
4. The item should succesffuly be added to the item group.
5. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
6. Name the new item group.
7. Make sure it is correctly added to the item group.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Katrin Fischer 2024-01-29 11:29:17 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-02-01 15:09:16 UTC
Pushed to 23.11.x for 23.11.03
Comment 10 Lucas Gass 2024-02-02 16:11:24 UTC
Backported to 23.05.x for upcoming 23.05.09