Type: Function
Function: IF
Syntax: IF(condition, value_if_true, [value_if_false])
or alternatively the shorthand version condition ? value_if_true : value_if_false
Description: If the first argument evaluates to true
then it returns the second argument, otherwise it returns the third argument (or null if none is provided). The second and the third arguments must have the same type.
Sample usage:
IF(updated_at > created_at, updated_at, created_at)
will always returnupdated_at
by definitionIF(1 > 2, "some result")
returnsnull
lines_changed > 500 ? "Big PR" : "Small PR"
returns “Big PR” for all pull requests with more than 500 lines of code changed and “Small PR” otherwise.IF(CONTAINS(label_names, ["defect", "bug", "fix"]), "Bug ", "Feature")
returnsBug
if one of the defined labels is found, otherwise returnsFeature
. This is used to remap fields.