Skip to content

ExtractValue sets undefined variable as string <nil> instead of leaving it undefined #2807

Open
@lug-gh

Description

@lug-gh

The “ExtractValue” function of the integration (incoming webhook in the semaphore) sets undefned variables as string <nil> instead of leaving them empty. This should be changed so that undefined variables remain undefined instead of filling them with a “dummy” string.

If you start the task via the SemaphoreUI web interface and leave a non-required survey variable empty, it will be undefined in the playbook. However, if this variable is omitted via the webhook, the semaphore task is filled with <nil>.

Example:
var1 is mandatory, var2 is optional.
When starting the task I can leave var2 empty, the playbook starts normally and in the playbook I can work with the default function (as it should be)

Image

However, if you start it via the integration as follows:

Image

If I call this webhook and only specify var1 as an element, var2 is filled with the string .

Image

Removing var2 from the ExtractValues is not an option, as it is a possible option, but not a required one.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions