-
Notifications
You must be signed in to change notification settings - Fork 19
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
allow other constraint to be filled #356
base: 3.12.x
Are you sure you want to change the base?
allow other constraint to be filled #356
Conversation
@wangf1122 The screenshot that you posted will be invalid because you did select other restriction for use constraint or access constraint |
We had discussed this issue during last community meeting session. The issue is this field doesn't allow any input if the user DOES NOT select "other restriction". So the error text is not so clear. I will ask the technical writer to compose another text and update the error itself. |
@@ -45,7 +45,8 @@ | |||
<SecurityNoteMismatchedBothLang>Value mismatched for Security User Note in both languages</SecurityNoteMismatchedBothLang> | |||
<SecurityClassificationUserNote>Security User Note is not valid for the classification code selected. Valid values are:</SecurityClassificationUserNote> | |||
<SecurityClassificationUserNoteEmpty>Security User Note should be empty for the classification code selected</SecurityClassificationUserNoteEmpty> | |||
<OtherConstraintsNote>If you indicate 'Other Restrictions' in the 'Access Constraints' or 'Use Constraints' fields, the other constraints for accessing or using the resource should be explained here.</OtherConstraintsNote> | |||
<OtherConstraintsNote>If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints' text box must be completed.</OtherConstraintsNote> |
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.
@@ -45,7 +45,8 @@ | |||
<SecurityNoteMismatchedBothLang>Value mismatched for Security User Note in both languages</SecurityNoteMismatchedBothLang> | |||
<SecurityClassificationUserNote>Security User Note is not valid for the classification code selected. Valid values are:</SecurityClassificationUserNote> | |||
<SecurityClassificationUserNoteEmpty>Security User Note should be empty for the classification code selected</SecurityClassificationUserNoteEmpty> | |||
<OtherConstraintsNote>If you indicate 'Other Restrictions' in the 'Access Constraints' or 'Use Constraints' fields, the other constraints for accessing or using the resource should be explained here.</OtherConstraintsNote> | |||
<OtherConstraintsNote>If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints' text box must be completed.</OtherConstraintsNote> |
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.
Should " text box must be completed" changed to " text box must be filled".
I don't believe completed the the correct term for filling in a form?
Or it could be rewritten to the following
If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, ensure to provide information for 'Other Constraints' field.
@@ -741,13 +741,22 @@ | |||
and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609' | |||
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609')) or | |||
|
|||
(../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' |
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.
I don't understand the extra or
condition which seem to indicate that if the other constraints is not specified in 'Access Constraints' or 'Use Constraints' then it is ok to add other constraints. I don't believe this correct...
I believe the user can only add other constraints if they specify other constraints in 'Access Constraints' or 'Use Constraints'
According to the HNAP 2.3.1 specification:
From the previous rules, I understand that otherConstraints is mandatory when accessConstraints or useConstraints are set to "otherRestrictions". In other cases, can be provided optionally. The original validation, allowed only a value in otherConstraints, if accessConstraints or useConstraints are set to "otherRestrictions", reporting an error in other cases. This seems not correct according to the previous rules. The pull request keeps the original validation, but provides clear messages. Please @ianwallen and @wangf1122 verify if my previous understanding is correct based on the specification text. If so I think the validation for In case that |
I agree that there is no specification indicating that otherConstraints cannot be used when accessConstraints or useConstraints are not set to otherRestrictions. So it does seem like it can be optional in this case. My only concern is how FGP currently handles this situation. I just tested FGP and it fails with this use case so if we implement this change, then FGP also has to implement the change as well. @bo-lu - could you provide your comments on this. Thank you |
The current validation doesn't allow this other constraint field to be filled if the user didn't select "other restriction" for Access Constraint field or User Constraint field.
This pull request removes such barrier. Other validation will still stay (i.e. check other constraint's emptiness if the user select "Other restriction" for Access Constraint field or User Constraint field.)