Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to reference previous Assignee and the Created Page in the outgoing email from Automation

Geoff Worling October 12, 2022

Hey all,

I've been wracking my brain trying to reference these within the body of the email but they keep coming up blank. I am using the following smart values but nothing seems to work:


Hello,

{{issue.key}} has been moved to QA status and is now ready for testing. Please reach out to key developer for details.

Issue Title | <b> {{issue.summary}}</b>
Description | <i>{{issue.description}}</I>
Developer | {{fieldChange.fromString}}
Documentation | {{createdPage.url}}


----

The issue title and description work perfectly but the last two, Developer and Documentation, don't seem to want to work. 

any help appreciated.

1 answer

0 votes
Trudy Claspill
Community Champion
October 12, 2022

Hello @Geoff Worling 

Welcome to the community.

Is this in an Automation Rule? What is the trigger for the Automation Rule? Can you show us all the components of the rule?

The createdPage smart value is usable only if your rule is creating a Confluence page. Refer to this documentation. Is your rule creating a Confluence page?

Geoff Worling October 12, 2022

Thanks for the comment!

This is an automation rule yes.

When issue transitioned to "QA" > assign to X > email (the body was attached the original question above) > create page 

I just now realized that I need to create the page before referring to it in the email body so that's solved but I still can't seem to get it to display the previous assignee no matter how I try it. 


Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2022

Hi @Geoff Worling, is the assignee getting changed as part of the transition? If you could show a screenshot of your rule it would be really helpful. 

Geoff Worling October 17, 2022

Appreciate the response. Heres a screencap, is this sufficient? Thanks!

Screen Shot 2022-10-17 at 1.11.58 PM.png

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2022

Hi @Geoff Worling,

What are you expecting the fieldChange.fromString to be? 

Geoff Worling October 17, 2022

Hi Simmo,

As far as I understood it, it would reference the changed field in the issue. In this case, the assignee. So it would display the previous assignee.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2022

Hi @Geoff Worling 

The change log smart values, {{fieldChange}} and {{changelog}} refer to any issue changes relative to the trigger issue.  Your trigger is on Issue Transitioned, so they would only refer to the status values.

If you need to refer to the previous assignee, as they change over time and for other trigger conditions, you would need to either save that value in a custom field when the Issue Assigned trigger fires or create a more complex rule which calls the REST API to extract the last assignee.

Kind regards,
Bill

Like Simmo likes this
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2022

Pretty much what @Bill Sheboy said :)

Though, if the assignee was changed as part of the transition, it might be available in the changelog.

Like Bill Sheboy likes this
Geoff Worling October 17, 2022

I used this guide from Jira itself so I guess this is where my confusion started...

Jira Smart Values - Issues 

Where it states the following example, which is exactly what I'm trying to do:

"{{fieldChange}}

Available anywhere smart values are supported, to access the value of a field that has changed. For example, if the Assignee of a field changes, you could add a comment to the issue to note who the previous assignee was, and who the new assignee is."

 

*sorry if this is about to be posted multiple times but it doesn't seem to be posting my reply properly*

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2022

Ah yeah, I can see that being a little confusing. As @Bill Sheboy said, the fieldChange is in relation to the trigger.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events