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

[DUOS-1755][risk=no] Step 2 DAR Form #1842

Merged
merged 14 commits into from
Oct 31, 2022
Merged

[DUOS-1755][risk=no] Step 2 DAR Form #1842

merged 14 commits into from
Oct 31, 2022

Conversation

connorlbark
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DUOS-1755


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@@ -1,22 +1,21 @@
import { Component } from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there's still a lot of cleanup to do to get the new DAR form functional + well designed, but I did my best to incorporate the new step 2 section into the old code.

Copy link
Contributor Author

@connorlbark connorlbark Oct 14, 2022

Choose a reason for hiding this comment

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

I will do the cleanup needed to get this to properly submit & look good (code wise) as part of finishing up #1805


const [datasets, setDatasets] = useState([]);
const today = new Date();
const irbProtocolExpiration = formData.irbProtocolExpiration || `${today.getFullYear().toString().padStart(4, '0')}-${today.getMonth().toString().padStart(2, '0')}-${today.getDate().toString().padStart(2, '0')}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is the irb expiration always one year from the time of upload?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. @solideoglori, any insights?

@connorlbark connorlbark marked this pull request as ready for review October 14, 2022 17:00
@connorlbark connorlbark requested a review from a team as a code owner October 14, 2022 17:00
Comment on lines +69 to +73
useEffect(() => {
fetchAllDatasets(formData.datasetIds).then((datasets) => {
setDatasets(datasets);
});
}, [formData.datasetIds]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is techincally inefficient, since it's refetching the datasets every time the user searches something new in the dataset search box. however, in practice, this seems to be robust/fast enough in my testing.

@connorlbark connorlbark changed the title [DUOS-1755][risk=no] WIP Step 2 DAR Form [DUOS-1755][risk=no] Step 2 DAR Form Oct 14, 2022
@JVThomas
Copy link
Contributor

Another bug found: If a user has a file tied to a DAR, clicks on the file upload button, and then exits out of the file selection window, the application errors out

Kapture 2022-10-27 at 08 02 45

@connorlbark
Copy link
Contributor Author

connorlbark commented Oct 27, 2022

Another bug found: If a user has a file tied to a DAR, clicks on the file upload button, and then exits out of the file selection window, the application errors out

Good catch! Simple fix pushed up.

Copy link
Contributor

@JVThomas JVThomas left a comment

Choose a reason for hiding this comment

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

Great work! This step's the most complicated out of the group due to the DULs and file processing, but it looks like the core logic is working as expected. Once the rest of the components are up you can check to see if saving and submission works as intended.

Copy link
Contributor

@quazi-h quazi-h left a comment

Choose a reason for hiding this comment

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

The new step 2 panel looks good and is functioning properly for me when running locally. The logic for the new components looks good to me.

@connorlbark connorlbark merged commit 55d78ca into develop Oct 31, 2022
@connorlbark connorlbark deleted the DUOS-1755 branch October 31, 2022 16:15
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.

4 participants