Bug 8399 - Problems with mandatory field alert message for authorities
Summary: Problems with mandatory field alert message for authorities
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Whiteboard:
Keywords:
: 8830 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-09 19:32 UTC by Katrin Fischer
Modified: 2016-02-15 18:56 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
screenshot (70.51 KB, image/png)
2012-07-09 19:32 UTC, Katrin Fischer
Details
Bug 8399: Display tab number on the mandatory field alert (authority) (1.50 KB, patch)
2015-03-31 13:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Screenshot (97.13 KB, image/png)
2015-04-14 08:16 UTC, Andreas Hedström Mace
Details
Bug 8399: No need to truncate the marc field text to 22 chars (5.70 KB, patch)
2015-04-14 09:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8399: No need to truncate the marc field text to 22 chars (5.88 KB, patch)
2015-04-14 09:56 UTC, Andreas Hedström Mace
Details | Diff | Splinter Review
[PASSED QA] Bug 8399: No need to truncate the marc field text to 22 chars (5.93 KB, patch)
2015-04-17 06:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 8399: Display tab number on the mandatory field alert (authority) (1.72 KB, patch)
2015-04-17 06:16 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2012-07-09 19:32:47 UTC
Created attachment 10725 [details]
screenshot

When creating a new authority (example: PERS_NAME) and only entering 100$a, on saving the record an alert will show the missing mandatory fields.

In the alert the descriptions of the messages are cut off and the tab number is missing (see screenshot).
Comment 1 Katrin Fischer 2014-09-01 12:02:25 UTC
This is still valid in current master. The tab numbers are not included in the error message and longer descriptions are cut off.
Comment 2 Jonathan Druart 2015-03-31 13:32:39 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-04-01 13:59:07 UTC
*** Bug 8830 has been marked as a duplicate of this bug. ***
Comment 4 Andreas Hedström Mace 2015-04-13 20:47:16 UTC
This patch only seems to solve one of the two issues in the bug. The tab number are there but longer descriptions are still being cut off.

Please correct me if i have missed something or misunderstood.
Comment 5 Jonathan Druart 2015-04-14 08:01:18 UTC
(In reply to Andreas Hedström Mace from comment #4)
> This patch only seems to solve one of the two issues in the bug. The tab
> number are there but longer descriptions are still being cut off.

Please detail, I don't understand the problem here.
Comment 6 Andreas Hedström Mace 2015-04-14 08:16:20 UTC
Created attachment 37795 [details]
Screenshot
Comment 7 Andreas Hedström Mace 2015-04-14 08:25:14 UTC
Added a screenshot of the issue. The description of the fields are still being cut off, like "fixed length control field" turning up as "fixed length control f". Hope this helps, otherwise ask again! =)
Comment 8 Jonathan Druart 2015-04-14 09:27:02 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-04-14 09:27:42 UTC
(In reply to Andreas Hedström Mace from comment #7)
> Added a screenshot of the issue. The description of the fields are still
> being cut off, like "fixed length control field" turning up as "fixed length
> control f". Hope this helps, otherwise ask again! =)

Perfect thanks!
The last patch fixes that.
Same on the biblio side.
Comment 10 Andreas Hedström Mace 2015-04-14 09:56:57 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2015-04-17 06:16:14 UTC
Created attachment 37995 [details] [review]
[PASSED QA] Bug 8399: No need to truncate the marc field text to 22 chars

The text for the marc field are truncated to 22 chars when displaying an
error on mandatory fields.
This limitation is useless and this patch removes it.

Test plan:
Create a mandatory subfield and set a long text (more than 22 chars)
edit or add an authority, click on save.
You should get the error displayed with the full text

Note that this patch modifies the same code for biblio.
Test plan is the same for biblio.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2015-04-17 06:16:27 UTC
Created attachment 37996 [details] [review]
[PASSED QA] Bug 8399: Display tab number on the mandatory field alert (authority)

A wrong variable scope was used here, the number value is contained in
the BIG_LOOP (note for later: change this variable name...).

Test plan:
1/ Define 1+ mandatory fields for an authority type
2/ Create an authority and don't fill the mandatory fields
3/ Try to save: the popup alert should display the number of the tab.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Tomás Cohen Arazi 2015-05-18 15:14:10 UTC
Patches pushed to master.

Thanks Jonathan!