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

[Publisher][Agency Settings] Fix data source questions bugs #1600

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

nasaownsky
Copy link
Collaborator

Description of the change

Fixed issues and bugs of data source questions

Type of change

All pull requests must have at least one of the following labels applied (otherwise the PR will fail):

Label Description
Type: Bug non-breaking change that fixes an issue
Type: Feature non-breaking change that adds functionality
Type: Breaking Change fix or feature that would cause existing functionality to not work as expected
Type: Non-breaking refactor change addresses some tech debt item or prepares for a later change, but does not change functionality
Type: Configuration Change adjusts configuration to achieve some end related to functionality, development, performance, or security
Type: Dependency Upgrade upgrades a project dependency - these changes are not included in release notes

Related issues

closes #1599

Checklists

Development

This box MUST be checked by the submitter prior to merging:

  • Double- and triple-checked that there is no Personally Identifiable Information (PII) being mistakenly added in this pull request

These boxes should be checked by the submitter prior to merging:

  • Tests have been written to cover the code changed/added as part of this pull request

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

@nasaownsky
Copy link
Collaborator Author

Welcome back @mxosman!

I moved all the issues you mentioned here into a separate task, if that's ok!

I also fix this part anyway:

Empty out the fields and send the empty field to the BE when a user clicks away from the "Other"

Comment on lines 171 to 185
if (key !== "CURRENT_AGENCY") {
updatedSetting[sourceType].collection_method.value = "";
if (key !== "OTHER") {
updatedSetting[sourceType].collection_method.other_description = "";
}
}
if (key !== "OTHER_AGENCY_OR_SYSTEM") {
updatedSetting[sourceType].modification.value = "";
if (key !== "OTHER") {
updatedSetting[sourceType].modification.other_description = "";
}
}
if (key !== "OTHER") {
updatedSetting[sourceType][settingType].other_description = "";
}
Copy link
Contributor

@mxosman mxosman Dec 2, 2024

Choose a reason for hiding this comment

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

Can you help me understand this section here? I'm confused - I assumed it's wiping out the other fields, but am not totally sure.

So if I select the second choice in What is the source of biological sex data in your system?:

What is the source of biological sex data in your system?

[x] Data is collected directly by the agency

This will clear out the collection_method value?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I'm following now - would you mind adding a small comment here explaining what these conditionals are doing for posterity?

Copy link
Contributor

@mxosman mxosman left a comment

Choose a reason for hiding this comment

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

Welcome back @mxosman!

I moved all the issues you mentioned here into a separate task, if that's ok!

I also fix this part anyway:

Empty out the fields and send the empty field to the BE when a user clicks away from the "Other"

That's perfect - I appreciate you making a separate task!

Looks great - just a request to add comments in the conditionals clearing out the non-relevant fields! Thank you for knocking these out so quickly - and for fixing the emptying out the fields when clicking away from "Other"!

@nasaownsky nasaownsky merged commit d281bb5 into main Dec 3, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants