-
Notifications
You must be signed in to change notification settings - Fork 175
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
[issue_tracker] Update validation to allow NULL Site #6526
[issue_tracker] Update validation to allow NULL Site #6526
Conversation
does this need a test plan update? |
@laemtl Could you update the test plan accordingly? Thank you! |
6ff3e2a
to
ca1fe3b
Compare
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.
Thanks Laetitia. good catch @cmadjar re the test plan. I've suggested a little more granularity in the update to the test plan.
Laetitia does this make sense to you, and could you fill in what is supposed to happen on the new testing point 7 ( see my suggestion/comment) -- merci !
5. Submit invalid and valid PSCID and visit label pairs. Error messages should respond accordingly. Not that you cannot submit PSCIDs from other sites unless you have access all profiles permission | ||
6. Submit just a visit label - this should give an error message. | ||
7. Check that all values are propagated and saved correctly. | ||
8. Add an attachment to the new issue and make sure that it is successfully uploaded. | ||
9. Check that watching logging is working - turn it off and on for your current user, and for other watchers on the issue |
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.
5. Submit invalid and valid PSCID and visit label pairs. Error messages should respond accordingly. Not that you cannot submit PSCIDs from other sites unless you have access all profiles permission | |
6. Submit just a visit label - this should give an error message. | |
7. Check that all values are propagated and saved correctly. | |
8. Add an attachment to the new issue and make sure that it is successfully uploaded. | |
9. Check that watching logging is working - turn it off and on for your current user, and for other watchers on the issue | |
5. Submit invalid and valid PSCID and visit label pairs. Error messages should display accordingly. | |
6. A user should be able to submit a PSCID from other sites only if they have access_all_profiles permission. | |
7. Submit a PSCID and leave the Site blank _ .. this should/not work if... _ | |
8. Submit just a visit label - this should give an error message. | |
9. Check that all values are propagated and saved correctly. | |
10. Add an attachment to the new issue and make sure that it is successfully uploaded. | |
11. Check that watching logging is working - turn it off and on for your current user, and for other watchers on the issue. |
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.
Breaking down testing point 5.
- To do : Point 7 - needs to be completed with what should be happening when a PSCID is entered with Null site.
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.
@christinerogers Are 7. and 3. redundant?
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 see your point.
3 could specify that PSCID is left blank.
7 tests the case where there is a PSCID, and Site doesn't match or is null.
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.
Thanks @laemtl
@@ -6,16 +6,20 @@ Issue Tracker Filter Form [Automation Testing] | |||
5. Test that the watching checkbox works correctly (issues that your userID is watching in issues_watching table) | |||
6. Check that links to issues in table are correct. | |||
7. Check that table sorts and displays additional pages correctly | |||
8. Check that a user who does not have access to all centers can see all issues with a site set to NULL. |
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.
this should say what permission it's referring to, since we have like 20 different access all site permissions..
9f02f64
to
43a2fa0
Compare
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.
Refining your change after dave's comment - see my comment about how User Accounts is used for this purpose (and this doesn't need to be explained).
Otherwise LGTM 👍
failing travis 😢 i know alex and shen are working on 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.
thanks Laetitia, looks great to me.
- This will need to be tested in Round 3 of 23 release testing, since it hasn't been merged/pulled onto the Test Vm for Round 2.
0ab8463
to
6fc6548
Compare
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.
Perhaps to make it more intuitive the user, we should replace the empty option in the drop down to a string that says "All" to make it clear that by not selecting a site, they are in fact selecting all sites.
👍 This used to be the practice across all module filters before Reactification, or at least many filters. @HenriRabalais Do you remember why we discontinued? |
@christinerogers iirc that was because it made the filter feel really busy with values that didn't need to be there. For filters, it's implied that if there's no value in the field, it's not filtering on that field (no value in filter field == no filtering for that field == all values for that field are presented). But for forms I don't think that same implication holds. It's expected that an empty field literally means that the value submitted will be NULL. If in this particular case for centerIds we are taking a NULL value in the back end to mean "All Sites", then I think the "All Sites" part is what should be communicated to the user on the front end. This way, the field would still be required, but they would have the option of selecting "All Sites". |
Thanks @HenriRabalais, good points - I wonder what the odds are we'll get a user confused because they entered an issue for "All Sites" but can't filter on that literal value. |
@HenriRabalais GitHub says you requested changes but it's not clear from the thread what changes you want her to make on this PR.. is there something outstanding? Regarding the underlying issue, what if there was an |
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.
@driusan I'll make requested changes more clear:
I think that CenterID should remain a required field for submission, however an option should be available for the user that displays as "All Sites", but submits a NULL value to be stored in the datatable.
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.
see Henri's review
4350997
to
6264ad0
Compare
6264ad0
to
de317ae
Compare
Co-authored-by: christinerogers <christinerogers@users.noreply.github.com>
de317ae
to
ab5fdc9
Compare
@HenriRabalais I updated the code following your suggestion. |
988cae5
to
c02e59a
Compare
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.
Looks good! just some left over console log. I'll test out the PR and give it an approval if it passes.
result = <td>{this.state.data.fieldOptions.sites[cell]}</td>; | ||
// if cell is an array containing all sites values | ||
console.log(this.state.data.centerIDs); | ||
console.log(cell); |
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.
looks like some forgotten console logs
c02e59a
to
e046121
Compare
@driusan @HenriRabalais please re-review |
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 think this does what it aims to do!
Brief summary of changes
Since we want to allow new issues with NULL centerID to be created, the following changes have been made:
Add/Edit issue
Index
Test plan
Linked Issues