Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Smartvalue empty after JQL branch

Hi everybody,

 

I'm having trouble using smartvalue in an automation rule.

What I'm trying to do :

- I manually launch an automation from a request. This automation creates a new service Request with the same title.
- I search for a request with "JQL rule" and create a smartvalue containing a date from the request found (there can be only one in the system)

- I edit the created request with the date stored in the smart value.

 

Here is the automation :

image.png

The log is showing the date : 

image.png

 

Then, I edit the last created ticket and try to "paste" the value :

image.png

 

But the value is empty. When I log the value, it is also empty when I'm out of the JQL block.

 

How to keep the smartvalue available ?

 

Thanks a lot

 

 

 

1 answer

1 accepted

0 votes
Answer accepted

Hi @Julien FOURNIER 

It appears you are creating the new issue (request) before a branch statement, and then creating a variable inside of the branch.  Then you want to use the created variable later.  Is this correct?  If so...

First thing, when you create an issue in an automation rule, the engine provides a convenient way to access its fields: {{createdIssue}}  When you have created multiple issues, you may access them as a list from {{createdIssues}} (please note the plural smart value) 

Using {{createdIssue}} may eliminate your need for the branch.

Finally, your branch uses JQL and could return multiple issues (theoretically).  And so the rule engine runs that separately from the rest of the rule (asynchronously).  The value of the Created Variable will rarely contain any value of use because of that.

There is a very specific case when a created variable can be used outside of a branch: when the branch evaluates to one-and-only-one issue.  Please look at this article if that matches your case to support using the saved variable:

https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Create-variable-New-component/ba-p/1448118

Best regards,

Bill

Hi @Bill Sheboy !

thanks for your time and reply.

I understand I misuse the automation !

As I can't use the branch JQL, I've used another strategy !

I copy the information when another rule is executed. Then, the information is available in the request from where the rule is launched.

 

Thanks a lot

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you