Bug 21049

Summary: Rancor 007 field does not retain value
Product: Koha Reporter: Donna <bwsdonna>
Component: CatalogingAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: bwsdonna, fridolin.somers, julian.maurice, katrin.fischer, lucas, m.de.rooy, margaret, martin.renvoize, nick, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05 18.11.05 18.05.12
Attachments: Bug 21049: Fix value of material select for Rancor 007 widget
Bug 21049: Fix value of material select for Rancor 007 widget
Bug 21049: Fix value of material select for Rancor 007 widget
Bug 21049: Set 007/00 when selecting material type (Rancor)
Bug 21049: Fix value of material select for Rancor 007 widget
Bug 21049: Set 007/00 when selecting material type (Rancor)
Bug 21049: Fix value of material select for Rancor 007 widget
Bug 21049: Set 007/00 when selecting material type (Rancor)

Description Donna 2018-07-06 19:03:24 UTC
When using Rancor, 007 field editor, you select the material type, and as soon as the record is saved, it reverts to the first material type in the list.  The information is saved correctly, but every time the record gets edited the correct material type has to be selected again or else it is saved as the material type listed first in the dropdown.
Comment 1 Julian Maurice 2019-03-06 08:06:55 UTC Comment hidden (obsolete)
Comment 2 Michal Denar 2019-03-06 21:24:40 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2019-03-08 07:14:17 UTC
I am sorry Julian, but this doesn't appear to work for me.

- Open Advanced catalog editor
- Select first value of 007 (ER)
- Try to save (error about missing mandatory)
- 007 is reset to BKS

Updating severity of this bug - data loss.
Comment 4 Julian Maurice 2019-03-08 09:20:33 UTC
Created attachment 86351 [details] [review]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types
Comment 5 Julian Maurice 2019-03-08 09:20:36 UTC
Created attachment 86352 [details] [review]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.
Comment 6 Julian Maurice 2019-03-08 09:28:42 UTC
(In reply to Katrin Fischer from comment #3)
> I am sorry Julian, but this doesn't appear to work for me.
> 
> - Open Advanced catalog editor
> - Select first value of 007 (ER)
> - Try to save (error about missing mandatory)
> - 007 is reset to BKS
> 
> Updating severity of this bug - data loss.

If I understand correctly, you didn't set manually the position 0 of field 007 (the first select is not bound to any MARC data, it just modifies the editor line display).
I added a patch that automatically set position 0 automatically, so this should work as expected now.
Comment 7 Liz Rea 2019-03-21 14:34:17 UTC
This fixes the 007, howver while testing this I discovered the same issue happens on the 008. Will check for a bug for that, and if none will file one.

Signing off on this fix for the 007.

Cheers,
Liz
Comment 8 Liz Rea 2019-03-21 14:35:29 UTC
Created attachment 86848 [details] [review]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 9 Liz Rea 2019-03-21 14:35:32 UTC
Created attachment 86849 [details] [review]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 10 Josef Moravec 2019-03-23 08:27:40 UTC
Created attachment 86935 [details] [review]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 11 Josef Moravec 2019-03-23 08:27:43 UTC
Created attachment 86936 [details] [review]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 12 Nick Clemens (kidclamp) 2019-03-28 16:01:47 UTC
Awesome work all!

Pushed to master for 19.05
Comment 13 Martin Renvoize 2019-04-01 11:58:13 UTC
Pushed to 18.11.x for 18.11.05
Comment 14 Lucas Gass 2019-04-01 16:48:08 UTC
backported to 18.05.x for 18.05.12
Comment 15 Fridolin Somers 2019-04-30 06:03:49 UTC
Pushed to 17.11.x for 17.11.18