Bugzilla – Attachment 183425 Details for
Bug 39054
a need to distinguish between manual bibliographic record modifications and those being a consequence of authority modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39054: a need to distinguish between manual bibliographic record modifications and those being a consequence of authority modification
Bug-39054-a-need-to-distinguish-between-manual-bib.patch (text/plain), 6.45 KB, created by
Janusz Kaczmarek
on 2025-06-23 21:15:37 UTC
(
hide
)
Description:
Bug 39054: a need to distinguish between manual bibliographic record modifications and those being a consequence of authority modification
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2025-06-23 21:15:37 UTC
Size:
6.45 KB
patch
obsolete
>From 5ec410d529fdcbef4342188115d117fc2916517d Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Thu, 8 May 2025 19:48:48 +0000 >Subject: [PATCH] Bug 39054: a need to distinguish between manual bibliographic > record modifications and those being a consequence of authority modification > >Now, in action_logs, Koha does not distinguish between >manual bibliographic record modifications and those being >a consequence of authority modification. Both are logged >in the same way: module: CATALOGUING ; operation: MODIFY >; interface: intranet. > >It will be helpful to be able to distinguish this two >cases (for instance to be able to evaluate a librarian's >'koha' in the cataloguing process: a single action of >modification of one authority record launching a >modification of, say, 100 bibliographic records does not >equal to manual modification of 100 bibliographic >records. Also, if we trace issues in bibliographic >records after modification being performed and want >librarians to correct themselves, a biblio modification >being a consequence of an authority modification should >not be taken into account, etc.). > >Test plan: >========== >1. Have CataloguingLog system preference set to Log. >2. Find any bibliographic record linked with a authority > record (e.g. sn:1 linked to Heylin, Clinton). >3. Modify the bibliographic record (Edit > Edit record > > [make an edit] > Save). >3. In a separate tab, open the authority record and > modify the heading. >4. Go back to the bibliographic record tab and chose > Modification log. You will see the two recent operations > marked as 'Modify'. You are not able to distinguish > between the 'real' manual modification from the second > being the result of an authority record modification. >5. Apply the patch ; restart all. >6. Repeat p. 3 and 4. You should now see the last action > (resulting from authority modification) marked as > 'Merge', which allows you to distinguish the two > different actions. >--- > C4/AuthoritiesMarc.pm | 2 +- > C4/Biblio.pm | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 2 +- > 4 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index dfc0749861..ef1454de4f 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1792,7 +1792,7 @@ sub merge { > $indexer->index_records( $biblio->biblionumber, "specialUpdate", "biblioserver" ); > } > next if !$update; >- ModBiblio( $marcrecord, $biblio->biblionumber, $biblio->frameworkcode, { disable_autolink => 1 } ); >+ ModBiblio( $marcrecord, $biblio->biblionumber, $biblio->frameworkcode, { disable_autolink => 1, merge => 1 } ); > $counteditedbiblio++; > } > return $counteditedbiblio; >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index d847fe8f61..d03124c410 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -412,7 +412,8 @@ sub ModBiblio { > $decoding_error = "There was an error with this bibliographic record: " . $exception; > $record = $biblio->metadata->record_strip_nonxml; > } >- logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio $decoding_error BEFORE=>" . $record->as_formatted ); >+ my $action = $options->{'merge'} ? 'MERGE' : 'MODIFY'; >+ logaction( "CATALOGUING", $action, $biblionumber, "biblio $decoding_error BEFORE=>" . $record->as_formatted ); > } > > if ( !$options->{disable_autolink} && C4::Context->preference('AutoLinkBiblios') ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >index dae105f20e..f53d9af121 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -55,6 +55,8 @@ > <span>Delete</span> > [% CASE 'MODIFY' %] > <span>Modify</span> >+ [% CASE 'MERGE' %] >+ <span>Merge</span> > [% CASE 'ISSUE' %] > <span>Checkout</span> > [% CASE 'RETURN' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 60bf02e6bb..69995038bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -147,7 +147,7 @@ > <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value="" /> All</label> > [% END %] > >- [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'RESET PASS' 'Run' 'End' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' 'CREATE_RESTRICTION' 'MODIFY_RESTRICTION' 'DELETE_RESTRICTION' 'MODIFY_CARDNUMBER' ] %] >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'MERGE' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'RESET PASS' 'Run' 'End' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' 'CREATE_RESTRICTION' 'MODIFY_RESTRICTION' 'DELETE_RESTRICTION' 'MODIFY_CARDNUMBER' ] %] > [% IF actions.grep(actx).size %] > <label for="action[% actx| replace('\s+', '_') | html %]" class="viewlog" > ><input type="checkbox" id="action[% actx | replace('\s+', '_') | html %]" name="actions" value="[% actx | html %]" checked="checked" /> [% PROCESS translate_log_action action=actx %]</label >-- >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 39054
:
183425
|
183426
|
183427
|
183428
|
183429