Bug 31238 - Unable to save authorised value to frameworks subfields
Summary: Unable to save authorised value to frameworks subfields
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Emmi Takkinen
QA Contact: Testopia
URL:
Keywords:
Depends on: 29001
Blocks: 31869
  Show dependency treegraph
 
Reported: 2022-07-26 08:49 UTC by Emmi Takkinen
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

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


Attachments
Bug 31238: Fix typo in marc_subfields_structure.pl (1.59 KB, patch)
2022-07-26 09:05 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 31238: Fix typo in marc_subfields_structure.pl (1.73 KB, patch)
2022-07-26 12:15 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 31238: Fix typo in marc_subfields_structure.pl (1.78 KB, patch)
2022-07-28 21:11 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2022-07-26 08:49:17 UTC
While working on bug 31154 I stumbled on problem described above. As it states I'm unable to save authorised value to frameworks subfields and was wondering is anyone able to repeat this.   

I suspect that this is caused by changes made in bug 29001, before it variable $authorised_value in marc_subfields_structure.pl is succesfully filled with value indented to be saved. After applying bug again $authorised_value is undef.

To test:
1. Edit e.g. default frameworks subfield 952$8
2. Add or change fields authorised value
3. Save your changes
=> note that on subfield listing there is no mention that 952$8 is linked to any authorised value
=> if you edit 952$8 authorised value input is empty
Comment 1 Emmi Takkinen 2022-07-26 08:57:14 UTC
There seems to be a minor typo on marc_subfields_structure.pl, 

>$input->param("authorised_values_$id") 
should be 

>$input->param("authorised_value_$id")
Comment 2 Emmi Takkinen 2022-07-26 09:05:54 UTC
Created attachment 138119 [details] [review]
Bug 31238: Fix typo in marc_subfields_structure.pl

After bug 29001 one is unable to save authorised value to frameworks
subfields. This is caused by minor typo in marc_subfields_structure.pl.

To test:
1. Edit e.g. default frameworks subfield 952$8
2. Add or change fields authorised value
3. Save your changes
=> note that on subfield listing there is no mention that 952$8 is linked to any authorised value
=> if you edit 952$8 authorised value input is empty
4. Apply this patch.
5. Repeat steps 1.-3.
=> authorised value should now be saved

Sponsored-by: Koha-Suomi Oy
Comment 3 Biblibre Sandboxes 2022-07-26 12:15:00 UTC
Created attachment 138125 [details] [review]
Bug 31238: Fix typo in marc_subfields_structure.pl

After bug 29001 one is unable to save authorised value to frameworks
subfields. This is caused by minor typo in marc_subfields_structure.pl.

To test:
1. Edit e.g. default frameworks subfield 952$8
2. Add or change fields authorised value
3. Save your changes
=> note that on subfield listing there is no mention that 952$8 is linked to any authorised value
=> if you edit 952$8 authorised value input is empty
4. Apply this patch.
5. Repeat steps 1.-3.
=> authorised value should now be saved

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 4 Victor Grousset/tuxayo 2022-07-28 21:11:40 UTC
Created attachment 138231 [details] [review]
Bug 31238: Fix typo in marc_subfields_structure.pl

After bug 29001 one is unable to save authorised value to frameworks
subfields. This is caused by minor typo in marc_subfields_structure.pl.

To test:
1. Edit e.g. default frameworks subfield 952$8
2. Add or change fields authorised value
3. Save your changes
=> note that on subfield listing there is no mention that 952$8 is linked to any authorised value
=> if you edit 952$8 authorised value input is empty
4. Apply this patch.
5. Repeat steps 1.-3.
=> authorised value should now be saved

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2022-07-28 21:13:07 UTC
Works, QA script happy, code looks good, passing QA :)

Severity upped to major. Feel free to change if that's too much. Surely that's at least normal severity.
Comment 6 Tomás Cohen Arazi 2022-07-29 18:51:34 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Katrin Fischer 2022-09-26 22:02:04 UTC
Lucas, can you please check if this is needed in 22.05 (see comment on bug 29001?
Comment 8 Lucas Gass 2022-09-29 14:38:16 UTC
Backported to 22.05.x for 22.05.06
Comment 9 Arthur Suzuki 2022-10-12 10:10:39 UTC
I don't reproduce the issue on 21.11.x branch.
Also bz29001 was not applied there so maybe that one is not needed for backport.
Won't backport unless asked to.