[Koha-bugs] [Bug 24010] Number of issues to display to staff accepts non-integer values

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 25 13:06:46 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24010

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #134986|0                           |1
        is obsolete|                            |

--- Comment #21 from David Nind <david at davidnind.com> ---
Created attachment 136538
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136538&action=edit
Bug 24010: Number of issues to display to staff accepts non-integer values

This patch modifies the subscription entry form so that it will perform
a check on the staffdisplaycount and opacdisplaycount fields before
proceding to the second step. It verifies that the values are numeric.

The changes are made in the style of the existing form validation, which
should be rewritten to either use the validation plugin or to peform
checks in a way that all checks are run before warning the user.
However, this smaller change will work in the meantime.

To test, apply the patch and go to Serials -> New subscription.

- Fill out the form with at least the required fields, but put something
  other than a number if the "Number of issues to display to staff" and
  "Number of issues to display to the public" with non-numeric characters.
- When you click the "Next" button you should get an error message,
  "Number of issues to display to staff must be a number."
- Correct the issues to display to staff field and submit again.
- You should get a different error message, "Number of issues to display
  to the public must be a number."
- Correct this field and you should be able to proceed to the next step.

Signed-off-by: David Nind <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list