Bugzilla – Attachment 30667 Details for
Bug 7944
attribute error could be clearer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7944 - attribute error could be clearer
PASSED-QA-Bug-7944---attribute-error-could-be-clea.patch (text/plain), 3.15 KB, created by
Katrin Fischer
on 2014-08-10 21:12:31 UTC
(
hide
)
Description:
[PASSED QA] Bug 7944 - attribute error could be clearer
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-08-10 21:12:31 UTC
Size:
3.15 KB
patch
obsolete
>From 75db0e0ae5448939a930512d9f720fc3c5d4a614 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 18 Jul 2014 14:18:12 -0400 >Subject: [PATCH] [PASSED QA] Bug 7944 - attribute error could be clearer > >If you try to create a patron and enter an extended attribute value >which is required to be unique but exists in another record the error >you receive is not clear. It uses the attribute code instead of the >description. This patch adds description to the output. > >To test you must have ExtendedPatronAttributes enabled. > >- Edit or create an extended patron attribute and designate it a unique > identifier. >- Edit a patron and add a value to that attribute. >- Edit another patron and try to add the same value. > >You should get an error which includes both the description of the >attribute you tried to modify and the value you submitted. > >Signed-off-by: Christopher Brannon <christopher@debian.brannon.org> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, no problems found. >Passes tests and Qa script. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 3 +-- > members/memberentry.pl | 7 ++++++- > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 6745d62..da52fb7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -207,8 +207,7 @@ > <li id="ERROR_password_mismatch">Passwords do not match.</li> > [% END %] > [% IF ( ERROR_extended_unique_id_failed ) %] >- <li id="ERROR_extended_unique_id_failed">The attribute value >- [% ERROR_extended_unique_id_failed_value %] is already in use by another patron record.</li> >+ <li id="ERROR_extended_unique_id_failed"><strong>[% ERROR_extended_unique_id_failed_description %]</strong> attribute value <i>[% ERROR_extended_unique_id_failed_value %]</i> is already in use by another patron record.</li> > [% END %] > </ul> > </div> >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 49f728e..3c7f648 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -338,8 +338,13 @@ if ($op eq 'save' || $op eq 'insert'){ > $extended_patron_attributes = parse_extended_patron_attributes($input); > foreach my $attr (@$extended_patron_attributes) { > unless (C4::Members::Attributes::CheckUniqueness($attr->{code}, $attr->{value}, $borrowernumber)) { >+ my $attr_info = C4::Members::AttributeTypes->fetch($attr->{code}); > push @errors, "ERROR_extended_unique_id_failed"; >- $template->param(ERROR_extended_unique_id_failed_value => "$attr->{code}/$attr->{value}"); >+ $template->param( >+ ERROR_extended_unique_id_failed_code => $attr->{code}, >+ ERROR_extended_unique_id_failed_value => $attr->{value}, >+ ERROR_extended_unique_id_failed_description => $attr_info->description() >+ ); > } > } > } >-- >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 7944
:
9125
|
29865
|
30641
| 30667