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 :
The log is showing the date :
Then, I edit the last created ticket and try to "paste" the value :
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
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.