Closed closenma closed 2 weeks ago
The behaviour appears to be slightly different for the pending v4.1.1
upgrade (currently testable on UAT https://uat.library.ualberta.ca:3001/). Blank values now appear to be allowable. However, values of zero are still prohibited.
# app/models/research_output.rb
validates_numericality_of :byte_size, greater_than: 0, less_than_or_equal_to: 2**63,
allow_blank: true,
message: '(Anticipated file size) is too large. Please enter a smaller value.'
Looking at the above code, allow_blank: true,
has been added for v4.1.0
.
However, the translation is not enabled for the message, and the message could be improved. When specifying a value of zero, the '(Anticipated file size) is too large. Please enter a smaller value.'
message is still rendered.
@aaronskiba will close on upgrade to 4.1
This issue appears to be resolved for the current instance deployed on UAT.
User reports that on research outputs screen, there is a requirement for a non-zero number in the expected file size box that will not accept blank and 0. We may want to make this an optional entry.
Steps to reproduce: On a plan, create a new research output but leave the expected file size option blank or enter 0. This generates an error.
Tagging @lagoan for triage.