Bug 16682 - Fix display if Batch patron modification tool does not get any patrons
Summary: Fix display if Batch patron modification tool does not get any patrons
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-07 13:26 UTC by Nick Clemens
Modified: 2017-12-07 22:16 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16682 - Fix display if Batch patron modification tool does not get any patrons (1.74 KB, patch)
2016-07-06 16:47 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16682: Fix display if Batch patron modification tool does not get any patrons (1.83 KB, patch)
2016-07-07 09:28 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16682: Fix display if Batch patron modification tool does not get any patrons (1.87 KB, patch)
2016-07-08 02:18 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons (1.64 KB, patch)
2016-07-09 12:19 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16682: Fix display if Batch patron modification tool does not get any patrons (1.94 KB, patch)
2016-07-09 13:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons (1.71 KB, patch)
2016-07-09 13:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2016-06-07 13:26:08 UTC
To recreate:

1 - create a patron list with no patrons
2 - Go to Tools->Batch patron modification
3 - Select that empty list
4 - Stare blankly at a blank screen
Comment 1 Marc Véron 2016-07-06 15:47:51 UTC
You get the same result if you simply do not fill any of "Use a file", "Or use a patron list", "Or list card numbers...".
Comment 2 Marc Véron 2016-07-06 16:42:36 UTC
Changed Bug title to reflect all of the cases (see comment #1)
Comment 3 Marc Véron 2016-07-06 16:47:18 UTC Comment hidden (obsolete)
Comment 4 Srdjan Jankovic 2016-07-07 03:07:42 UTC
I think this needs an additional level of indentation, and maybe a comment at the [% END %] , just to mark what is being closed, because it is far away.
Also, I prefer [% IF something %] [% ELSE %] rather than [% IF !something %] [% ELSE %], but that's not that important.
Comment 5 Marc Véron 2016-07-07 09:22:50 UTC
(In reply to Srdjan Jankovic from comment #4)
> I think this needs an additional level of indentation, and maybe a comment
> at the [% END %] , just to mark what is being closed, because it is far away.
> Also, I prefer [% IF something %] [% ELSE %] rather than [% IF !something %]
> [% ELSE %], but that's not that important.

Hi Srdjan, thanks for testing.
I'll change the strategy for this, patch follows.
Comment 6 Marc Véron 2016-07-07 09:28:28 UTC Comment hidden (obsolete)
Comment 7 Srdjan Jankovic 2016-07-08 02:18:43 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2016-07-08 15:16:43 UTC
I think the message should follow the pattern used when you try to delete a currency which is in use. Something like this:

<h1>Batch patrons modification</h1>
<div class="dialog alert">
    <p>No patron card numbers given.</p>
    <form action="/cgi-bin/koha/tools/modborrowers.pl" method="get">
        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
    </form>
</div>
Comment 9 Marc Véron 2016-07-09 12:19:17 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2016-07-09 13:04:51 UTC
Created attachment 53236 [details] [review]
Bug 16682: Fix display if Batch patron modification tool does not get any patrons

To reproduce:
- Go to Tools->Batch patron modification
- Submit without filling any of  "Use a file", "Or use a patron list",
  "Or list card numbers..." or use a patron lists with zero members
Result: Screen without any information

To test:
- Apply patch
- Repeat steps above
- Verify that you get a nice message
- Verify that the tool works as before
  - with invalid card numbers only
  - with valid and invalid card numbers
  - with valid card numbers only

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2016-07-09 13:04:56 UTC
Created attachment 53237 [details] [review]
Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons

Format message as proposed in comment #8

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Kyle M Hall 2016-07-15 14:13:00 UTC
Pushed to master for 16.11, thanks Marc!
Comment 13 Frédéric Demians 2016-08-01 13:38:17 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 14 Julian Maurice 2016-08-17 10:25:13 UTC
Patches pushed to 3.22.x, will be in 3.22.10