Bug 33670

Summary: Changes from bug 29146/bug 30250 doesn't apply when duplicate record suspected
Product: Koha Reporter: Noémie Labine <noemie.labine>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, m.de.rooy, maude.boudreau, noemie.labine
Version: 22.05   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 29146, 30250    
Bug Blocks:    

Description Noémie Labine 2023-05-03 19:15:49 UTC
Bz29146/30250 changed the behavior of the default values to make it so they are only applied when creating a new record so if someone wanted to delete a field that had default valued in the framework, those informations wouldn't reappear when the record was saved. 

The old behavior seems to still apply when Koha detects a duplicate record.

Test plan :

1. Have a framework with a default value in any non mandatory field. Make sure this field is visible in the editor. For my exemple I had "rdacontent" as the default value in subfield $2 of field 336.
2. Create a new record and delete the $2 that appears with my default value
3. Fill all the mandatory fields and in 245 write the title of an existing record in your catalogue to create a duplicate. 
4. Save the record. The page will refresh and you'll have the "Duplicate record suspected" alert asking you if this is a new record or a duplicate. 
5. Go to the field you deleted (336 in my exemple), the default value came back.

To compare, do all of the same steps, but create a record that has no duplicate in the catalogue. When you save the record, the deleted field is not populated with the default values, it stays deleted as it should.
Comment 1 Katrin Fischer 2023-05-10 10:45:19 UTC
Hi, what does your configuration for ApplyFrameworkDefaults look like?
Comment 2 Noémie Labine 2023-05-10 11:54:57 UTC
Hi, oups forgot to mention :-)

All options are selected.

Thanks