Bugzilla – Attachment 50368 Details for
Bug 16256
Can't edit library EAN if you leave EAN empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16256 - Can't edit library EAN if you leave EAN empty
Bug-16256---Cant-edit-library-EAN-if-you-leave-EAN.patch (text/plain), 3.06 KB, created by
Chris Cormack
on 2016-04-19 00:24:35 UTC
(
hide
)
Description:
Bug 16256 - Can't edit library EAN if you leave EAN empty
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-04-19 00:24:35 UTC
Size:
3.06 KB
patch
obsolete
>From e3addd9e73d6c9041bed92f9c778d04bbcce1abd Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 18 Apr 2016 16:19:47 +0000 >Subject: [PATCH] Bug 16256 - Can't edit library EAN if you leave EAN empty > >Test Plan: >1) Create an empty EAN >2) Edit it and save >3) Note you get a new EAN row >4) Apply this patch >5) Edit the empty EAN again >6) Note you now get an updated EAN and not a new row > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.z> > >Depends on bug 16208 (which depends on 16206) >--- > admin/edi_ean_accounts.pl | 11 +++-------- > .../intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt | 4 ++-- > 2 files changed, 5 insertions(+), 10 deletions(-) > >diff --git a/admin/edi_ean_accounts.pl b/admin/edi_ean_accounts.pl >index ceb7ef5..f65ab9e 100755 >--- a/admin/edi_ean_accounts.pl >+++ b/admin/edi_ean_accounts.pl >@@ -58,7 +58,7 @@ elsif ( $op eq 'delete_confirm' ) { > } > else { > if ( $op eq 'save' ) { >- my $change = $input->param('oldean'); >+ my $change = $input->param('id'); > if ($change) { > editsubmit(); > } >@@ -124,19 +124,14 @@ sub addsubmit { > } > > sub editsubmit { >- $schema->resultset('EdifactEan')->search( >- { >- branchcode => $input->param('oldbranchcode'), >- ean => $input->param('oldean'), >- } >- )->update_all( >+ $schema->resultset('EdifactEan')->find( $input->param('id') )->update( > { > branchcode => $input->param('branchcode'), > description => $input->param('description'), > ean => $input->param('ean'), > id_code_qualifier => $input->param('id_code_qualifier'), > } >- ); >+ ); > return; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >index d5d5bc0..1475c92 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >@@ -52,7 +52,7 @@ > <input type="hidden" name="op" value="save" /> > [% IF ean %] > <input type="hidden" name="oldbranchcode" value="[% ean.branch.branchcode %]" /> >- <input type="hidden" name="oldean" value="[% ean.ean %]" /> >+ <input type="hidden" name="id" value="[% ean.id %]" /> > [% END %] > > <fieldset class="rows"> >@@ -149,7 +149,7 @@ > [% END %] > </td> > <td class="actions"> >- <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&ean=[% ean.id %]"><i class="fa fa-pencil"></i> Edit</a> > <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&ean=[% ean.id %]"><i class="fa fa-trash"></i> Delete</a> > </td> > </tr> >-- >2.1.4
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 16256
:
50357
|
50368
|
50395
|
50448