Bugzilla – Attachment 180202 Details for
Bug 38925
Update record 'date entered on file' when duplicating a record -- in advanced editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
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-.patch (text/plain), 2.11 KB, created by
Janusz Kaczmarek
on 2025-04-01 14:26:35 UTC
(
hide
)
Description:
Bug 38925: Update record 'date entered on file' when duplicating a record -- in advanced editor (MARC21)
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2025-04-01 14:26:35 UTC
Size:
2.11 KB
patch
obsolete
>From c21bfa203d638e293d4365855be0bb91ef548f88 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 1 Apr 2025 14:16:04 +0000 >Subject: [PATCH] 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. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index f51950f3b8..494d466bc3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -423,6 +423,10 @@ > if ( !record.error ) { > var remove_control_num = [% IF Koha.Preference('autoControlNumber') == 'OFF' %] false [% ELSE %] true [% END %]; > if( remove_control_num ){ record.removeField("001"); } >+ if( parts[0] === 'duplicate' ) { >+ let today = new Date(); >+ record.field('008').subfield('@', today.toISOString().substring(2,10).replaceAll('-','') + record.field('008').subfield('@').substring(6)); >+ } > editor.displayRecord( record ); > editor.focus(); > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38925
:
180202
|
180209