Automation Smart Values
Asked by Casey Enderlein:

Hello,

Having an issue with smart values not dynamically pulling in the data when sending email update, wondering if this is a branching issue?

Rule:

1.) When issue transitioned from 'ready to prod', 'test', or 'awaiting approval' to 'done'

2.) Branching: For: Parent

a.) Status does not equal done

b.) And: Children match (status = 'done)

c.) Then send email

**Subject:** Status {{issue.parent.Epic Link}} requires review!

**Body:**Children issues related to this epic indicated we have completed work and the epic {{issue.parent.key}} (Summary: {{issue.parent.epic.summary}}) does not reflect status "done". Please review this epic detail and update epic status if complete. Thank you!

Can you guide me on correct syntax to use or any updates that need to be made with the branching rule setup?

Thank you kindly -Casey


Answers:
author: Connor
body: Hi Casey,

I think you can remove "parent" from the smart values, because you're in a "Parent Branch" which is defined as:
> Find the parent issue of the issue that triggered this rule.

So in that branch, the rule should be looking at the Epic of the issue that transitioned to "Done". As you have it now, you're trying to pull the "Parent" of that Epic, which would only work if you were using an issue hierarchy larger than the default Epic\>Standard Issue\>Sub-task.

Try this:

**Subject:**Status {{issue.key}} requires review!

**Body:**Children issues related to this epic indicated we have completed work and the epic {{issue.key}} (Summary: {{issue.summary}}) does not reflect status "done". Please review this epic detail and update epic status if complete. Thank you!

comments: author: Casey Enderlein
body: Thank you! We resolved with smart values {{triggerIssue.epic.key}} and {{triggerIssue.epic.summary}}.

I do have another question on a separate rule where I am also having trouble with accurate smart value to leverage... below is the email message triggered to assignee when any of the fields we have in the rule are shown as 'empty'

*"Uh oh... your recently completed issue {{Issue.key}} is missing required fields. You may review your missing fields in your 'My Dashboard'.*

*Thank you!"*

In this email we would also like to list out all fields we have setup in the rule so it shows them which one(s) is in fact empty, can you help guide me here on correct smart value to use? Furthermore, the rule is setup with 'and' (e.g. if Requestor is empty \> send email; if change magnitude is empty \> send email), ideally we would like this set up as 'or' and one email message (e.g. if requestor, or change magnitude, or value statement is empty \> then send email), however not sure how to create OR logic.


author: Casey Enderlein
body: Hi there, I was able to resolve the rule to be if 'or' - and I was able to find some coding values for our custom field smart values and will be testing today to see if this pulls in the data we are after. Will provide an update after testing.


author: Leslie Fobi
body: Can someone help with the smart value for Project Lead in jira

I am currently using this but returns null {{issue.project.lead}}


Tags: cloud

jira-service-management

jira-service-management-cloud