-
Notifications
You must be signed in to change notification settings - Fork 38
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
Always show saveBlocker dialog for unclaimed blockers #4703
Conversation
Fixes #4693 If the field is not required and the value is null or undefined, do not invalidate rule. Otherwise if field is requried and value is null or undefined, invalidate rule.
@specify/ux-testing When testing this, can #4705 be tested as well? You should not be able to recreate the issue on this branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Make sure a CollectionObject from has the
collectionObjectAttribute
relationship as a subview and does not have theuniqueIdentifier
field- Find an existing CollectionObject which does not have a
Col Obj Attribute
- Add a Col Obj Attribute to the Collection Object and ensure a saveBlocker is not set
Can confirm that this fixes #4693
- In SchemaConfig, make
uniqueIdentifier
required on CollectionObject- Repeat steps 2-3, but this time make sure a saveBlocker is set and a dialog appears saying uniqueIdentifier must be unique to the database
- Add uniqueIdentifier to the CollectionObject form (or use the AutoGenerated Form) and ensure the uniqueness rule functions correctly
Looks good! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ✅ Make sure a CollectionObject from has the
collectionObjectAttribute
relationship as a subview and does not have theuniqueIdentifier
field - ✅ Find an existing CollectionObject which does not have a
Col Obj Attribute
- ✅ Add a Col Obj Attribute to the Collection Object and ensure a saveBlocker is not set
- ✅ In SchemaConfig, make
uniqueIdentifier
required on CollectionObject - ✅ Repeat steps 2-3, but this time make sure a saveBlocker is set and a dialog appears saying uniqueIdentifier must be unique to the database
- ✅ Add uniqueIdentifier to the CollectionObject form (or use the AutoGenerated Form) and ensure the uniqueness rule functions correctly
In testing for locality with #4705:
Save behaves as expected for locality records added after initial save.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Make sure a CollectionObject from has the
collectionObjectAttribute
relationship as a subview and does not have theuniqueIdentifier
field - Find an existing CollectionObject which does not have a
Col Obj Attribute
- Add a Col Obj Attribute to the Collection Object and ensure a saveBlocker is not set
- In SchemaConfig, make
uniqueIdentifier
required on CollectionObject - Repeat steps 2-3, but this time make sure a saveBlocker is set and a dialog appears saying uniqueIdentifier must be unique to the database
- Add uniqueIdentifier to the CollectionObject form (or use the AutoGenerated Form) and ensure the uniqueness rule functions correctly
This also fixed issue #4705.
Initially, the save was blocked, but I left the tab and returned to it after some time and it was no longer blocked. I don't know what I did, and I was not able to recreate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ups, pressed "Request changes" accidentally
Fixes #4693
Fixes #4705
The issue from #4693 (comment) was that adding a
Col Obj Attribute
to an existing CollectionObject saved triggered aresource.change
for every field on the CollectionObject.This caused business rules to be triggered for every field.
There is a uniqueness rule for CollectionObject which states that
uniqueIdentifier
must be unique at a database level.Thus the uniqueness rule was triggered (as there are other CollectionObjects with NULL uniqueIdentifer) and the saveBlocker was set. Since the field was not present on the CollectionObject form, no indication was made to the user.
Checklist
and self-explanatory (or properly documented)
Testing instructions
collectionObjectAttribute
relationship as a subview and does not have theuniqueIdentifier
fieldCol Obj Attribute
uniqueIdentifier
required on CollectionObject