Bug 29662 - PrefillItem should apply to all subfields when SubfieldsToUseWhenPrefill is null
Summary: PrefillItem should apply to all subfields when SubfieldsToUseWhenPrefill is null
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: regression
Depends on: 27526
Blocks: 29663
  Show dependency treegraph
 
Reported: 2021-12-08 16:55 UTC by Andrew Fuerste-Henry
Modified: 2022-09-08 15:49 UTC (History)
7 users (show)

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


Attachments
Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill is empty (1.69 KB, patch)
2021-12-13 10:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill is empty (1.84 KB, patch)
2022-09-08 15:49 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-12-08 16:55:27 UTC
To recreate:
- turn on PrefillItem
- confirm SubfieldsToUseWhenPrefill is empty
- create an item, confirm no values are prefilled for next item
- set at least one subfield in SubfieldsToUseWhenPrefill
- create an item, confirm specified subfield(s) get prefilled for next item

In previous versions, leaving SubfieldsToUseWhenPrefill blank meant all subfields were prefilled.
Comment 1 Jonathan Druart 2021-12-13 10:52:15 UTC
Do you know when the regression happened?

On bug 27526 I have explicitly taken this use case into account so I guess I compared with current master (21.06).
Comment 2 Jonathan Druart 2021-12-13 10:53:34 UTC
Created attachment 128436 [details] [review]
Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill is empty
Comment 3 Jonathan Druart 2021-12-13 10:54:21 UTC
This patch removes the code that dealt with that specific case, but it would be good to know when this regression occurred.
Comment 4 Hayley Pelham 2021-12-22 21:21:24 UTC
Hello,

Can someone please give a test plan for this patch?

Cheers,
Hayley
Comment 5 Katrin Fischer 2022-01-09 11:30:39 UTC
Hi Hayley, 

I think you can do the following:

Before applying the patch:
- turn on PrefillItem system preference
- confirm SubfieldsToUseWhenPrefill system preference is empty
- create an item, confirm no values are prefilled for next item
- set at least one subfield in SubfieldsToUseWhenPrefill
- create an item, confirm specified subfield(s) get prefilled for next item

Apply patch:
- create an item, confirm it behaves the same as before with your defined subfield getting prefilled
- Empty SubfieldsToUseWhenPrefill system preferene
- create an item, confirm that now all item subfields are prefilled
Comment 6 Jonathan Druart 2022-03-22 14:01:50 UTC
Andrew, does this patch fix the problem you reported?
Comment 7 sandboxes@biblibre.com 2022-09-08 15:49:03 UTC
Created attachment 140344 [details] [review]
Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill is empty

Signed-off-by: Thibault Keromnès <thibault.keromnes@univ-paris8.fr>