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

BUGFIX: 'fields' property missing from queryConfig in DataExplorer #1947

Merged
merged 8 commits into from
Aug 31, 2017

Conversation

121watts
Copy link
Contributor

@121watts 121watts commented Aug 30, 2017

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Rebased/mergable
  • Tests pass
  • Sign CLA (if not already signed)

Connect #1576

The problem

It appears the queryConfig in the DataExplorer got into a state where the fields key was missing.

The Solution

Toughen up the happy path of query creation in the FieldList component and toggleField function in /queryTransitions

Repro Steps (Assuming you are using Chrome)

  1. Go to DataExporer
  2. Build a query with a field
  3. Go into console
  4. Go to Application tab
  5. Delete the fields key from localStorage
  6. Navigate away from DE and back again try clicking on fields and watch everything break

Notes

Really we should be validating every qC that gets saved to localStorage and preventing bogus state from getting saved in the first place.

@121watts 121watts changed the title Bugfix/some fields BUGFIX: Field property missing from queryConfig in DataExplorer Aug 30, 2017
@121watts 121watts changed the title BUGFIX: Field property missing from queryConfig in DataExplorer BUGFIX: 'fields' property missing from queryConfig in DataExplorer Aug 30, 2017
Copy link
Contributor

@lukevmorris lukevmorris left a comment

Choose a reason for hiding this comment

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

LGTM - 1 comment


this.setState({
fields: fieldSets[measurement].map(f => {
return {field: f, funcs: []}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can has implicit return here, yes?

@121watts 121watts merged commit 2a0eee6 into master Aug 31, 2017
@121watts 121watts deleted the bugfix/some-fields branch August 31, 2017 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants