portagenetwork / roadmap

Developed by the the Alliance in collaboration with University of Alberta, DMP Assistant a data management planning tool, forking the DMP Roadmap codebase
MIT License
6 stars 1 forks source link

Input Required in Expected File Size for Research Outputs #737

Closed closenma closed 2 weeks ago

closenma commented 2 months ago

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.

image001

Tagging @lagoan for triage.

aaronskiba commented 2 months 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.

aaronskiba commented 2 months ago
# 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.

lagoan commented 1 month ago

@aaronskiba will close on upgrade to 4.1

aaronskiba commented 2 weeks ago

This issue appears to be resolved for the current instance deployed on UAT.