Bug 38925

Summary: Update record 'date entered on file' when duplicating a record -- in advanced editor
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: CatalogingAssignee: Janusz Kaczmarek <januszop>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: m.de.rooy, nick, phil
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36552
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38925: Update record 'date entered on file' when duplicating a record -- in advanced editor (MARC21)
Bug 38925: Update record 'date entered on file' when duplicating a record -- in advanced editor (MARC21)

Description Janusz Kaczmarek 2025-01-19 10:10:46 UTC
With Bug 36552 we set 'date entered on file' (MARC21: 008/0-5, UNIMARC: 100a/0-7) of a record created by duplication of an existing record to the current date instead of having there the value from the original record.

The same should be done for the advanced editor (for now, it retains the date of the original record).
Comment 1 Janusz Kaczmarek 2025-04-01 14:26:35 UTC
Created attachment 180202 [details] [review]
Bug 38925: Update record 'date entered on file' when duplicating a record -- in advanced editor (MARC21)

With Bug 36552 we set 'date entered on file' (MARC21: 008/0-5)
of a record created by duplication of an existing record to the current
date instead of having there the value from the original record.

The same should be done for the advanced editor (for now, it retains
the date of the original record).

Test plan:
==========
1. Enable EnableAdvancedCatalogingEditor systempreference.
2. Open any record in advanced editor to make it default. Go back to
   record normal display.
3. Make a duplicate: Edit > Edit as new (duplicate)
4. Note that the date in 008/0-5 is of the original record, not of
   today.
5. Apply the patch ; restart_all.
6. Repeat p. 3. The date in 008/0-5 should be of the today. If not,
   refresh browser's cache (Ctrl+Shift+R etc.) to get the fresh
   version of the JS.
Comment 2 Roman Dolny 2025-04-01 14:50:44 UTC
Created attachment 180209 [details] [review]
Bug 38925: Update record 'date entered on file' when duplicating a record -- in advanced editor (MARC21)

With Bug 36552 we set 'date entered on file' (MARC21: 008/0-5)
of a record created by duplication of an existing record to the current
date instead of having there the value from the original record.

The same should be done for the advanced editor (for now, it retains
the date of the original record).

Test plan:
==========
1. Enable EnableAdvancedCatalogingEditor systempreference.
2. Open any record in advanced editor to make it default. Go back to
   record normal display.
3. Make a duplicate: Edit > Edit as new (duplicate)
4. Note that the date in 008/0-5 is of the original record, not of
   today.
5. Apply the patch ; restart_all.
6. Repeat p. 3. The date in 008/0-5 should be of the today. If not,
   refresh browser's cache (Ctrl+Shift+R etc.) to get the fresh
   version of the JS.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Marcel de Rooy 2025-04-11 08:14:58 UTC
Looks like that this change does what we expect. But I am not really sure if we are doing it in the right place given the amount of related javascript code for the advanced editor.

Nick: Could you please have a look here?