Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra checks for non-numeric values in weight and count fields during seedlot creation #5150

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

afpowell
Copy link
Contributor

Description

Gives user an error message if they enter non-numeric values in the seed amount or weight fields, rather than allowing the seedlot to be created.

Closes #5149

Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

@afpowell afpowell requested review from isaak and alockrow October 14, 2024 15:07
Copy link
Contributor

@alockrow alockrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. However, I noticed it won't accept a new seedlot with 0 count or 0 weight so there's now no option to make an empty seedlot. Is that a problem?

@afpowell
Copy link
Contributor Author

That's a great point, and I should definitely check with the group about it at the ticket meeting. The empty seedlot creation using 0s being disallowed is the current behaviour on master and, in terms of this PR, we still probably don't want to allow this weird 'backdoor' way of creating them by inserting character strings that then get turned into NAs, but it's definitely worth a discussion as to whether this should be enabled (via legitimate means)

@lukasmueller lukasmueller merged commit 6f0e62e into master Oct 17, 2024
3 checks passed
@lukasmueller lukasmueller deleted the topic/seedlot_creation_numeric_check branch October 17, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seedlot creation does not give error when user inputs string into seedlot count
4 participants