Bug 33412 - (bug 15869 follow-up) Overlay record framework is always setting records to original framework
Summary: (bug 15869 follow-up) Overlay record framework is always setting records to o...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
: 33342 (view as bug list)
Depends on: 15869
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-04 19:11 UTC by Nick Clemens (kidclamp)
Modified: 2024-07-04 20:37 UTC (History)
8 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:
23.05.00,22.11.06
Circulation function:


Attachments
Bug 33412: Fix comparison (905 bytes, patch)
2023-04-05 12:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33412: Fix comparison when checking for overlay framework (1.48 KB, patch)
2023-04-25 12:09 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33412: Fix comparison when checking for overlay framework (1.54 KB, patch)
2023-05-03 22:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33412: Fix comparison when checking for overlay framework (1.48 KB, patch)
2023-05-08 17:48 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33412: Fix comparison when checking for overlay framework (1.53 KB, patch)
2023-05-08 21:20 UTC, David Nind
Details | Diff | Splinter Review
Screenshots - settings and results after patch applied (265.80 KB, application/pdf)
2023-05-08 22:14 UTC, David Nind
Details
Bug 33412: Fix comparison when checking for overlay framework (1.61 KB, patch)
2023-05-09 07:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-04-04 19:11:15 UTC
$overlay_framework = undef if $overlay_framework = '_USE_ORIG';

should clearly be:

$overlay_framework = undef if $overlay_framework eq '_USE_ORIG';
Comment 1 Nick Clemens (kidclamp) 2023-04-05 12:27:58 UTC
Created attachment 149201 [details] [review]
Bug 33412: Fix comparison
Comment 2 Nick Clemens (kidclamp) 2023-04-25 12:09:54 UTC
Created attachment 150191 [details] [review]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off
Comment 3 Katrin Fischer 2023-05-03 22:32:09 UTC
Created attachment 150622 [details] [review]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2023-05-03 22:33:06 UTC
As the feature is already in stable releases it might be nice to rephrase the bug description a little to be more descriptive of how the problem manifests.
Comment 5 Phil Ringnalda 2023-05-05 20:36:49 UTC
*** Bug 33342 has been marked as a duplicate of this bug. ***
Comment 6 Mengu Yazicioglu 2023-05-05 20:44:41 UTC
(In reply to Katrin Fischer from comment #4)
> As the feature is already in stable releases it might be nice to rephrase
> the bug description a little to be more descriptive of how the problem
> manifests.

Strongly agree.
What about adding stage marc import and manage-marc-import.pl keywords in the title?
Comment 7 Phil Ringnalda 2023-05-05 21:14:04 UTC
Test plan was missing a step where you import with Keep original framework and verify that the job succeeds.

Since the option value is _USE_ORIG_ with a trailing underscore, it doesn't get undeffed by checking for eq to _USE_ORIG without a trailing underscore, and the job fails.
Comment 8 David Nind 2023-05-06 21:06:42 UTC
Some discussion on this issue on the mailing list over the last couple of days:
- Development list: https://lists.koha-community.org/pipermail/koha-devel/2023-May/048136.html
- Main list: https://lists.katipo.co.nz/pipermail/koha/2023-May/059402.html
Comment 9 Nick Clemens (kidclamp) 2023-05-08 17:48:17 UTC
Created attachment 150804 [details] [review]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off
Comment 10 David Nind 2023-05-08 21:20:14 UTC
Created attachment 150809 [details] [review]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Katrin Fischer 2023-05-08 21:32:04 UTC
I've now repeated the steps several times, but this doesn't seem to work right for me:

1) Exported Perl best practices (biblionumber 5)
2) Staged for import, match on biblionumber, replace, don't process items
3) The record matched on biblionumber
4) When replacing records use this framework: Kit
5) Imported the record
6) Framework remains Books, Booklets, ...

Patch was applied, restarted all multiple times.
Comment 12 David Nind 2023-05-08 22:14:07 UTC
Created attachment 150817 [details]
Screenshots - settings and results after patch applied

I tested again, using the record you used, and it still worked for me.

So I'm not sure why it isn't working for you 8-(.

I also tested with settings changed about not checking for embedded data and not importing items (even though there isn't in this case), but it still worked.

Also, I normally go flushed_memcached and restart_all after applying a patch, as well as using a fresh browser (with a cleared cache). This time I just did a restart_all and then used the same browser windows. It still worked OK.

In addition, I re-staged the file for import, rather than using the previously staged batch.

I've attached some screenshots of the settings I used and the results, if this helps.
Comment 13 Katrin Fischer 2023-05-08 22:16:36 UTC
Hi David, thx for taking the time! I'll reset to Signed off, I won't have time right now to dig deeper on this one and another set of eyes might help.
Comment 14 Jonathan Druart 2023-05-09 07:28:07 UTC
Created attachment 150822 [details] [review]
Bug 33412: Fix comparison when checking for overlay framework

TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Tomás Cohen Arazi (tcohen) 2023-05-09 14:00:09 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 16 Matt Blenkinsop 2023-05-15 10:36:29 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 17 Lucas Gass (lukeg) 2023-06-15 16:45:36 UTC
Missing dependencies for 22.05.x, no backport.