Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira automation variable value set to empty

How can I set a Jira automation variable to empty ? 

When adding a variable I have to provide a value.

The current workaround is to set the value of the variable from an empty custom field.

Screenshot 2021-03-12 at 22.58.48.png


-- but this is not a really professional solution :-)


Thanks your your feedback



3 answers

1 accepted

1 vote
Answer accepted

One workaround:

  1. Create the variable with a value that is an arbitrary known string:
    • Variable name:  myCoolVariable
    • Smart value:  _EMPTY
  2. Set ("create") the same variable again with a value that is itself with the "remove" function called on the same arbitrary known string:
    • Variable name:  myCoolVariable
    • Smart value:  {{myCoolVariable.remove("_EMPTY")}}

You can just use {{remove}} to empty a field.

0 votes
nmenere Atlassian Team Mar 16, 2021

Hey Peter,

I'd love to hear the use-case for this as I can't really think of one.


Nick Menere
Automation Group Product Manager

@nmenere  Here is our use case

1 .We have a 1st level Servicedesk per country ( 10+ Servicedesks)

2. Each Country Servicedesk has different values for the Technical/Application categorisation as they have different services/applications

3. We have automated ticket routing for 2nd level support Servicedesk's based on cascading fields (Technical/Application categorisation) from the 1st Level Servicedesk.

We are using Automation rules to evaluate the Technical/Application values and then set to correct Technical/Application categorisation for the 2nd level Servicedesks. In certain case we have to set the cascading field to empty


"fields": {
"customfield_10052" : { "value": "Services", "child": { "value" : "{{TechnicalCategory}}"} },
"customfield_10051" : { "value": "{{ApplicationCategory}}", "child": { "value" : "{{ApplicationCategoryChild}}"}}

Where variable {{ApplicationCategoryChild}} has to be empty

I have a scenario where I need to check if any of a set of possible changes occurred during an Issue Updated event.

I need to create a variable defaulted to empty / null.  Then with a sequence of if-elseif-elseif, if any branch is true it sets the variable to a non-empty value (like "true").  Then the rule is allowed to proceed only if the variable is not empty.  (I need to use if-elseif because Automation does not provide logical "OR".)

Workaround:  Check the variable for exactly "true" (or not "false").  but "code" not as "clean".

Scenario: we have a transition screen where you can check boxes like "Create Epic for this work"

Within the automation rules we create various issues and based on if an epic is created, set that as the epic link.

Since we can't do an if within an if, I can't check if the epic is created and should be linked so I have created that as a global variable and setting that variable within the block of the epic creation.

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira Service Management

An unofficial way to monitor a JSM mail handler for errors

...eturns true if any content is returned for the s...

718 views 3 20
Read article

Atlassian Community Events