Iss2444 - Fix saved queries not persisting timeframe radio selections#278
Open
jadecarino wants to merge 2 commits intogalasa-dev:mainfrom
Open
Iss2444 - Fix saved queries not persisting timeframe radio selections#278jadecarino wants to merge 2 commits intogalasa-dev:mainfrom
jadecarino wants to merge 2 commits intogalasa-dev:mainfrom
Conversation
Signed-off-by: Jade Carino <carino_jade@yahoo.co.uk>
Signed-off-by: Jade Carino <carino_jade@yahoo.co.uk>
3331f43 to
d4da5ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Fixes galasa-dev/projectmanagement#2444
Problem
When switching between saved queries with different timeframe configurations, the radio button selections for "From" and "To" time options were not being preserved correctly, causing two problems:
Cause of bug: Radio button selections were stored only in local component state and never persisted to the URL. The component relied on
isRelativeToNowto infer which radio buttons should be selected, but this approach could not distinguish between all four valid combinations (Duration+Now, Duration+Specific, Specific+Now, Specific+Specific) and did not preserve the saved query configuration when switching between queries.isRelativeToNow:The
isRelativeToNowproperty is still required to control runtime behavior (whether "To" date is dynamic new Date() or fixed) but should have never been used to populate radio button selections when switching between queries.Changes