Bug 8399

Summary: Problems with mandatory field alert message for authorities
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: MARC Authority data supportAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: andreas.hedstrom.mace, fridolin.somers, indradg, jcamins, jonathan.druart, nengard, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: screenshot
Bug 8399: Display tab number on the mandatory field alert (authority)
Screenshot
Bug 8399: No need to truncate the marc field text to 22 chars
Bug 8399: No need to truncate the marc field text to 22 chars
[PASSED QA] Bug 8399: No need to truncate the marc field text to 22 chars
[PASSED QA] Bug 8399: Display tab number on the mandatory field alert (authority)

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!