Bug 24564 - The adding of new subfields according to IFLA updates doesn't respect existing tab
Summary: The adding of new subfields according to IFLA updates doesn't respect existin...
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on: 20434
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-03 10:27 UTC by Koha Team University Lyon 3
Modified: 2021-05-25 14:34 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12


Attachments
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl (2.19 KB, patch)
2021-03-31 08:53 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.40 KB, patch)
2021-04-01 09:12 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.58 KB, patch)
2021-04-01 14:14 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl (2.19 KB, patch)
2021-04-02 08:14 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.63 KB, patch)
2021-04-02 08:14 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl (2.24 KB, patch)
2021-04-02 16:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.68 KB, patch)
2021-04-02 16:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl (2.29 KB, patch)
2021-04-26 01:23 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.73 KB, patch)
2021-04-26 01:23 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl (2.35 KB, patch)
2021-05-07 13:51 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 24564: Use the same tab as the other subfields within a field (3.79 KB, patch)
2021-05-07 13:51 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2020-02-03 10:27:20 UTC
When using the script  misc/migration_tools/ifla/update.pl (cf. BZ20434), missing fields/subfields are added but if subfields already existed in the framework, the script doesn't verifiy in which tab they existed and can add them in a different tab.So for the same field, you could have subfields in different tabs. It can lead to wrong and blocking alerts when saving a biblio record.
Comment 1 Julian Maurice 2021-03-31 08:53:00 UTC
Created attachment 119032 [details] [review]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)
Comment 2 Julian Maurice 2021-04-01 09:12:37 UTC
Created attachment 119068 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)
Comment 3 Julian Maurice 2021-04-01 14:14:01 UTC
Created attachment 119082 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)
Comment 4 Koha Team University Lyon 3 2021-04-02 08:14:19 UTC
Created attachment 119103 [details] [review]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)
Comment 5 Koha Team University Lyon 3 2021-04-02 08:14:22 UTC
Created attachment 119104 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: Koha team <koha@univ-lyon.fr>
Comment 6 Koha Team University Lyon 3 2021-04-02 08:18:34 UTC
I have followed the test plan and the script works correctly now.
If we tried to add new subfields in an existing field, it checks in which tab are the existing fields and add it in the same tab.
Tested for biblios and authorities.
Thanks !
Comment 7 PTFS Europe Sandboxes 2021-04-02 16:18:51 UTC
Created attachment 119136 [details] [review]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Comment 8 PTFS Europe Sandboxes 2021-04-02 16:18:55 UTC
Created attachment 119137 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: Koha team <koha@univ-lyon.fr>

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Comment 9 Victor Grousset/tuxayo 2021-04-21 20:25:49 UTC Comment hidden (obsolete)
Comment 10 Marcel de Rooy 2021-04-23 07:22:32 UTC Comment hidden (obsolete)
Comment 11 Marcel de Rooy 2021-04-23 08:54:39 UTC Comment hidden (obsolete)
Comment 12 Victor Grousset/tuxayo 2021-04-26 01:23:51 UTC
Created attachment 120156 [details] [review]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 13 Victor Grousset/tuxayo 2021-04-26 01:23:56 UTC
Created attachment 120157 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: Koha team <koha@univ-lyon.fr>

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 14 Victor Grousset/tuxayo 2021-04-26 01:31:10 UTC
Don't have a good grasp about the code and can't tell if a relevant change is missing.

But as a step towards QA, here is another signoff.
Comment 15 Nick Clemens 2021-05-07 13:51:46 UTC
Created attachment 120691 [details] [review]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Nick Clemens 2021-05-07 13:51:49 UTC
Created attachment 120692 [details] [review]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: Koha team <koha@univ-lyon.fr>

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 17 Nick Clemens 2021-05-07 13:53:46 UTC
Just noting - if other subfields are ignored, then the added subfield preserves the tab in the yaml.  I think this makes sense
Comment 18 Jonathan Druart 2021-05-10 14:17:38 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 19 Fridolin Somers 2021-05-12 14:15:30 UTC
Pushed to 20.11.x for 20.11.06
Comment 20 Andrew Fuerste-Henry 2021-05-25 12:20:44 UTC
Pushed to 20.05.x for 20.05.12
Comment 21 Victor Grousset/tuxayo 2021-05-25 14:34:44 UTC
Backported: Pushed to 19.11.x branch for 19.11.18