Bugzilla – Attachment 59672 Details for
Bug 15030
Certain values in serials' items are lost on next edit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value
Bug-15030---Fixes-the-serials-fields-associated-wi.patch (text/plain), 2.76 KB, created by
Jonathan Druart
on 2017-01-31 09:29:18 UTC
(
hide
)
Description:
Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-01-31 09:29:18 UTC
Size:
2.76 KB
patch
obsolete
>From 18c23c85718709826bb90256cff8326faad0020a Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Wed, 21 Oct 2015 14:35:18 -0400 >Subject: [PATCH] Bug 15030 - Fixes the serials fields associated with a > plugin, to not overwrite the previously saved value > >This fixes the remaining fields from serials-edit.pl that were seeing their previously entered values >be oblitarated with each new edit. The fields associated to a plugin (dateaccessioned and barcode) were >always displaying <empty> with each new edit, losing the previous effort. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Items.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index fdcd5f9..2188ca4 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -3053,15 +3053,18 @@ sub PrepareItemrecordDisplay { > }); > my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id}, tabloop => undef }; > $plugin->build( $pars ); >+ if ( $itemrecord and my $field = $itemrecord->field($tag) ) { >+ $defaultvalue = $field->subfield($subfield); >+ } > if( !$plugin->errstr ) { > #TODO Move html to template; see report 12176/13397 > my $tab= $plugin->noclick? '-1': ''; > my $class= $plugin->noclick? ' disabled': ''; > my $title= $plugin->noclick? 'No popup': 'Tag editor'; >- $subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript; >+ $subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript; > } else { > warn $plugin->errstr; >- $subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" />); # supply default input form >+ $subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" />); # supply default input form > } > } > elsif ( $tag eq '' ) { # it's an hidden field >-- >2.9.3
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 15030
:
43601
|
43701
|
43785
|
44798
|
45297
|
45753
|
49908
|
49909
|
49910
|
49911
|
53449
|
53450
|
53456
|
53457
|
53458
|
53459
|
59671
|
59672
|
59673
|
59674
|
59723
|
59724
|
59725
|
59726
|
59792
|
59793
|
59794
|
59795