Bugzilla – Attachment 110491 Details for
Bug 14367
History for MARC records. Roll back changes on a timeline or per field.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14367: (follow-up) Rebasing to make patch work on master
Bug-14367-follow-up-Rebasing-to-make-patch-work-on.patch (text/plain), 7.17 KB, created by
David Nind
on 2020-09-21 19:53:53 UTC
(
hide
)
Description:
Bug 14367: (follow-up) Rebasing to make patch work on master
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-09-21 19:53:53 UTC
Size:
7.17 KB
patch
obsolete
>From a53476fdb9d3f62537780050764f3ccdf1ace6c4 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 7 Feb 2019 19:55:38 +0000 >Subject: [PATCH] Bug 14367: (follow-up) Rebasing to make patch work on master > >Run through test plan and confirm everything still works as expected. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Biblio.pm | 2 +- > Koha/MetadataRecord/History.pm | 2 +- > cataloguing/addbiblio.pl | 2 +- > .../prog/en/modules/cataloguing/addbiblio.tt | 37 ++++++++++++++++------ > 4 files changed, 30 insertions(+), 13 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index a322b11108..8acc3f5abe 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -301,7 +301,7 @@ sub ModBiblio { > # update biblionumber and biblioitemnumber in MARC > # FIXME - this is assuming a 1 to 1 relationship between > # biblios and biblioitems >- my $sth = $dbh->prepare("select biblioitems.biblioitemnumber, biblio_metadata.history from biblioitems, biblio_metadata where biblioitems.biblionumber=?"); >+ my $sth = $dbh->prepare("select biblioitems.biblioitemnumber, biblio_metadata.history from biblioitems INNER JOIN biblio_metadata ON biblioitems.biblionumber = biblio_metadata.biblionumber WHERE biblioitems.biblionumber=?"); > $sth->execute($biblionumber); > my ($biblioitemnumber, $history) = $sth->fetchrow; > $sth->finish(); >diff --git a/Koha/MetadataRecord/History.pm b/Koha/MetadataRecord/History.pm >index 66798db504..951162e8c3 100644 >--- a/Koha/MetadataRecord/History.pm >+++ b/Koha/MetadataRecord/History.pm >@@ -100,7 +100,7 @@ sub HistoryParse { > my $json = shift; > if (!defined $json) { > warn "HistoryParse: Missing JSON parameter"; >- return undef; >+ return; > } > my $input = decode_json($json); > # Reindex the dataset; order all values by datetime under each tag name. >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 8bc361622d..8d647456e9 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -862,7 +862,7 @@ if ( $op eq "addbiblio" ) { > else { > ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); > } >- if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){ >+ if ($redirect eq "items" || (defined $mode && $mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){ > if ($frameworkcode eq 'FA'){ > print $input->redirect( > '/cgi-bin/koha/cataloguing/additem.pl?' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index a8c621851a..b510b4db80 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE Koha %] >+[% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title | html %] (Record number [% biblionumber | html %])[% ELSE %]Add MARC record[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -22,13 +23,28 @@ > var Sticky; > $(document).ready(function() { > >- $(".input_marceditor").click(function(this){ >- historyToggle($(this).attr('id') + '_history'); >+ $(".input_marceditor").click(function(){ >+ var tag = $(this).attr('id'); >+ historyToggle(tag + '_history'); > return false; > }); > >- $(".tag_editor").click(function(this){ >- openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, $(this).attr('id'), 'biblio'); >+ $(".tag_editor").click(function(){ >+ var tag = $(this).attr('id'); >+ openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, tag, 'biblio'); >+ return false; >+ }); >+ >+ $(".buttonHistory").click(function(){ >+ var tag = $(this).attr('id'); >+ HistoryToggle(tag + '_history'); >+ return false; >+ }); >+ >+ $(".hist_rollback").click(function(){ >+ var tag = $(this).attr('data-tag'); >+ var value = $(this).attr('data-history'); >+ HistoryRollback(tag, value); > return false; > }); > >@@ -895,21 +911,22 @@ > > [% IF ( subfield_loo.history ) %] > <span class="subfield_history"> >- <a href="#" class="buttonHistory" onclick="HistoryToggle('[% mv.id %]_history'); return false;"> >- <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" /> >+ <a href="#" class="buttonHistory" id="[%- mv.id | html -%]"> >+ <img src="[% interface | html %]/[% theme | html %]/img/icon-history.png" alt="History" title="Display history for this field" /> > </a> > </span> > >- <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history"> >+ <table class="history_table" id="[%- mv.id | html -%]_history" name="[%- mv.name | html -%]_history"> > <tr> > <th>Value</th> > <th>Date</th> >+ <th>User</th> > </tr> > [% FOREACH hist IN subfield_loo.history %] > <tr> >- <td><a href="#" onclick="HistoryRollback('[% mv.id %]', '[% hist.data %]'); return false;">[% hist.data %]</a></td> >- <td>[% hist.datetime %]</td> >- <td>[% hist.title %] [% hist.firstname %] [% hist.surname %]</td> >+ <td><a href="#" data-tag='[%- mv.id | html -%]' data-history='[% hist.data | html %]' class='hist_rollback'>[% hist.data | html %]</a></td> >+ <td>[% hist.datetime | $KohaDates with_hours = 1 %]</td> >+ <td>[% hist.title | html %] [% hist.firstname | html %] [% hist.surname | html %]</td> > </tr> > [% END %] > </table> >-- >2.11.0
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 14367
:
41642
|
56613
|
64243
|
84841
|
84842
|
84859
|
88827
|
88828
|
88829
|
102065
|
102066
|
102067
|
102173
|
102174
|
102175
|
110138
|
110139
|
110140
|
110225
|
110226
|
110227
|
110442
|
110443
|
110444
|
110489
|
110490
|
110491
|
116621
|
120480
|
121025
|
121076
|
126413
|
126414
|
131214
|
131215
|
145655
|
145656
|
146997
|
146998