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

Prevent user from saving CO without current determination #4901

Open
wants to merge 14 commits into
base: production
Choose a base branch
from

Conversation

CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented May 10, 2024

Fixes #4819

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Go to Data Entry->Collection Object
  • Add multiple determinations
  • Play around with deleting, unchecking and adding a current determination
  • Verify save is blocked when no current determinations exist
  • Verify save is enabled when a current determination is added

@CarolineDenis CarolineDenis added this to the 7.9.7 milestone May 23, 2024
@sharadsw sharadsw marked this pull request as ready for review May 31, 2024 14:35
@sharadsw sharadsw self-assigned this May 31, 2024
Copy link
Contributor

@melton-jason melton-jason left a comment

Choose a reason for hiding this comment

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

This approach is fine for now given how businessRules and saveBlockers are currently implemented 😅

Still is a mess with how verbose and complicated it is to add 'simple' behavior such as this.
Thus most of these comments are just related to refactoring and nothing functional.

sharadsw and others added 4 commits May 31, 2024 13:44
Co-authored-by: Jason Melton <64045831+melton-jason@users.noreply.github.com>
- uses onAdded instead
- setting isCurrent to true in onAdded triggers the isCurrent fieldCheck which unchecks other determinations
Copy link
Contributor

@melton-jason melton-jason left a comment

Choose a reason for hiding this comment

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

Much simpler, thanks for refactoring this!

@sharadsw sharadsw requested a review from a team June 3, 2024 15:16
Copy link

@Areyes42 Areyes42 left a comment

Choose a reason for hiding this comment

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

Testing instructions

  • Go to Data Entry->Collection Object
  • Add multiple determinations
  • Play around with deleting, unchecking and adding a current determination
  • Verify save is blocked when no current determinations exist
  • Verify save is enabled when a current determination is added

Looks good!
Screenshot 2024-06-03 at 11 29 03 AM

@Areyes42 Areyes42 requested a review from a team June 3, 2024 16:36
Copy link
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

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

  • Go to Data Entry->Collection Object
  • Add multiple determinations
  • Play around with deleting, unchecking and adding a current determination
  • Verify save is blocked when no current determinations exist
  • Verify save is enabled when a current determination is added

Looks good! Worked with unchecking and deleting, as well as newly added determinations. No unexpected behavior during my checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋Back Log
Development

Successfully merging this pull request may close these issues.

Collection Objects without any current determination can be saved
6 participants