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

Remove ANY option for interpolated property quality #342

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Jul 12, 2024

What this PR does / why we need it:
When a "Get interpolated property values" query is used with Quality set to ANY (which is the default option) it errors because it's not a valid value for the query. This PR removes it from the options for interpolated queries and automatically replaces ANY with GOOD on the backend (since it works on a first run and by using GOOD that's probably in line with users expect)

Which issue(s) this PR fixes:

Fixes #326

Special notes for your reviewer:

@iwysiu iwysiu marked this pull request as ready for review July 12, 2024 21:43
@iwysiu iwysiu requested a review from a team as a code owner July 12, 2024 21:43
@iwysiu iwysiu requested review from idastambuk and kevinwcyu and removed request for a team July 12, 2024 21:43
Comment on lines 107 to 110
let currQualities = qualities;
if (query.queryType === QueryType.PropertyInterpolated) {
currQualities = qualities.slice(1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

add this to the top of the file underneath where const qualities is defined so it's only created once.

const interpolatedPropertyQualities: Array<SelectableValue<SiteWiseQuality>> = qualities.slice(1);

and change this here to

Suggested change
let currQualities = qualities;
if (query.queryType === QueryType.PropertyInterpolated) {
currQualities = qualities.slice(1);
}
const currQualities = query.queryType === QueryType.PropertyInterpolated ? interpolatedPropertyQualities : qualities;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@iwysiu iwysiu merged commit 4a3bdbe into main Jul 22, 2024
9 checks passed
@iwysiu iwysiu deleted the iwysiu/326 branch July 22, 2024 15:31
@ssjagad ssjagad mentioned this pull request Sep 18, 2024
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.

Get interpolated property values quality "ANY"
2 participants