Prompted empty variable incorrectly falls back to default value #3560
Labels
kind/bug
This issue represents a verified problem we are committed to solving
Milestone
If you have a prompted variable in your project variables (not mandatory) with a default value, then you create a release and specifically clear the default value (making it blank), during the deployment the variable falls back to the default value.
Since the user has specifically cleared the value at the point of creating the release, we should honour that decision and use the empty value.
After discussions with the team, this "treat blank/empty to mean not set, so fallback to default" is probably used in quite a few places and we need to be consistent across the board. Whoever picks up this ticket, please consider reviewing the codebase for other areas where this same variable fallback behaviour may need to be reviewed, and make them all consistent.
We should use null checking here (if possible) to determine whether we fallback to the default value or not.
Eg. If null, then fallback to the default value, else use whatever the variable is set to (even if that is an empty string).
Source: https://secure.helpscout.net/conversation/379801418/16299/?folderId=801354
The text was updated successfully, but these errors were encountered: