Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function creates a variable for storing a boolean value, and directly setsvalue.

This value will be immediately returned and can be accessed by the getBoolean() function afterwards within the same expression.


Code Block
languagebash
titleSyntax
linenumberstrue
setBoolean(variableName, value) #Output: Boolean


UI Expand
titleExamples


Expression parserDescription


Code Block
languagebash
linenumberstrue
setBoolean("myBoolean",true)


This example creates the variable "myBoolean", sets the boolean value true and returns it accordingly.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
variableName

Status
subtletrue
titletext

A text for the variable name.
value

Status
subtletrue
titleBOOLEAN

A JWT expression, which must return a boolean value of true or false.



UI Expand
titleOutput

This function returns a 

Status
subtletrue
titleboolean


UI Text Box
typetip

To retrieve the value stored in the variable, use the function getBoolean() within the same expression.



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_setboolean" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Since Jira Expressions allows to have variables, there is a simple workaround for this:

Code Block
languagebash
let myBoolean = issue.priority.name>"Medium";
myBoolean ? "It is correct": "It's not"





Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description

Creates a variable to temporarily store a boolean value

Output

Status
subtletrue
titleboolean

Available since

Status
subtletrue
colourBlue
title2.6.0

Label