Skip to content

Updated wait time logic to allow "0" from FF#848

Closed
severinbeauvais wants to merge 1 commit intobcgov:mainfrom
severinbeauvais:main
Closed

Updated wait time logic to allow "0" from FF#848
severinbeauvais wants to merge 1 commit intobcgov:mainfrom
severinbeauvais:main

Conversation

@severinbeauvais
Copy link
Collaborator

Issue #: None

Description of changes:

  • app version = 5.8.1
  • updated wait time logic to allow "0" from the FF
  • updated default FFs accordingly

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).

- updated wait time logic to allow "0" from the FF
- updated default FFs accordingly
@severinbeauvais severinbeauvais self-assigned this Oct 29, 2025
Copilot AI review requested due to automatic review settings October 29, 2025 19:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the default values for hardcoded wait time feature flags from 0 to -1 and updates the condition logic to check for >= 0 instead of > 0. This allows 0 to be a valid hardcoded value while using -1 to indicate "use actual wait time from API."

  • Changed default feature flag values from 0 to -1 for wait times
  • Updated condition checks from > 0 to >= 0 to support 0 as a valid hardcoded value
  • Enhanced documentation with JSDoc comments explaining the return logic

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
app/src/plugins/launchDarkly.ts Updated default values for hardcoded wait time feature flags from 0 to -1
app/src/components/new-request/stats.vue Updated condition logic to >= 0 and improved documentation for wait time getters
app/package.json Version bump to 5.8.1
Comments suppressed due to low confidence (1)

app/src/components/new-request/stats.vue:115

  • The condition in the created() lifecycle hook still checks for === 0, which is inconsistent with the new default value of -1. This should be updated to check for < 0 or === -1 to determine when to fetch stats from the API. With the current code, stats will never be fetched when using the new defaults.
      GetFeatureFlag('hardcoded_regular_wait_time') === 0 ||
      GetFeatureFlag('hardcoded_priority_wait_time') === 0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@severinbeauvais
Copy link
Collaborator Author

I changed this to Do No Merge as we don't have a requirement here...

What should be displayed when we "disable" the wait times? Zero? Dash?

@severinbeauvais
Copy link
Collaborator Author

As I said above, there are no requirements at this time.

Should we support "0" using the FF? Should it display "0" or "-"? Or should "-1" display a dash on-screen?

Closing this PR for now.

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