Bugzilla – Attachment 42966 Details for
Bug 14141
Changing the Library for a notice duplicates the notice instead of updating it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14141: Do not let edit the branch when updating/copying notice
Bug-14141-Do-not-let-edit-the-branch-when-updating.patch (text/plain), 3.73 KB, created by
Nick Clemens (kidclamp)
on 2015-09-30 02:02:50 UTC
(
hide
)
Description:
Bug 14141: Do not let edit the branch when updating/copying notice
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-09-30 02:02:50 UTC
Size:
3.73 KB
patch
obsolete
>From e3ac563232906e43dd3387a5a247f8a0b75007ee Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Jul 2015 12:00:33 +0100 >Subject: [PATCH] Bug 14141: Do not let edit the branch when updating/copying > notice > >If a user modify the library when he's updating a notice, the notice >will be duplicated, instead of modified. > >To reproduce: >1/ Go on the notice & slips tools (tools/letter.pl) >2/ Create a notice A for library L1 >3/ Edit this notice and update the library with L2 >4/ On the list view, you will observe that 2 notices A now exist, one >for L1 and one for L2. > >The code in tools/letters.pl should be rebuilt completely, it becomes a >house of cards. To prevent this bug, I suggest to not let the user >modify the library value on editing a notice. >It cans be done by copying the notice to another library and remove the >original one. >Counter patch welcomed. > >Test plan: >1/ Go on the notice & slips tools (tools/letter.pl). >2/ Create a notice A for library L1. >3/ Edit this notice: you are not able to modify the library anymore. >4/ Copy the notice to library L2. You are not able to modify the library >neither. > >Works ok. > >Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 23 +++++++++++++--------- > tools/letter.pl | 1 + > 2 files changed, 15 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 1d4bfbc..b48b0f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -271,19 +271,24 @@ $(document).ready(function() { > [% END %] > <fieldset class="rows"> > <input type="hidden" name="oldbranchcode" value="[% oldbranchcode %]" /> >+ <ol> > [% IF independant_branch %] > <input type="hidden" name="branchcode" value="[% independant_branch %]" /> > [% ELSE %] >- <ol> >- <li> >- <label for="branch">Library:</label> >- <select name="branchcode" id="branch" style="width:20em;"> >- <option value="">All libraries</option> >- [% FOREACH branchloo IN branchloop %] >- [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] >+ <li> >+ >+ <label for="branch">Library:</label> >+ [% IF adding %] >+ <select name="branchcode" id="branch" style="width:20em;"> >+ <option value="">All libraries</option> >+ [% FOREACH branchloo IN branchloop %] >+ [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] >+ [% END %] >+ </select> >+ [% ELSE %] >+ [% Branches.GetName( branchcode ) %] > [% END %] >- </select> >- </li> >+ </li> > [% END %] > <li> > <label for="module">Koha module:</label> >diff --git a/tools/letter.pl b/tools/letter.pl >index 8bc0c8e..f4173dc 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -241,6 +241,7 @@ sub add_form { > module => $module, > branchloop => _branchloop($branchcode), > SQLfieldnames => $field_selection, >+ branchcode => $branchcode, > ); > return; > } >-- >1.9.1
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 14141
:
40987
|
41076
|
41077
|
42769
|
42966
|
42967
|
42983
|
42984