How to include Organization in an email communication using Automation for JIRA (cloud)

Rosa M Fossi
Contributor
September 26, 2018

Hello All, 
I can't quite figure out how to produce the Org when using smart values (for a notification email automation). What's the {{issue.x?X?}} for it?   
While searching and filtering, it looks as if it's a custom field, but I tried the "{{issue.customfield_10001}} to no avail.   Thoughts?

JIRA org.png

 

Here is my current line:

{{reporter.displayName}} from {{issue.customfield_10001}} has created a new request!

 

5 answers

1 accepted

1 vote
Answer accepted
John McKiernan
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 1, 2018

Hi Rosa,

getting warmer indeed!

OK, in this case - what you will need is {{issue.Organizations.name}}

Let me know if that works for you :)

Cheers,

John

Rosa M Fossi
Contributor
October 2, 2018

Thanks for continuing to help.

At first, it seemed that 

{{issue.Organizations.name}}

was not working...  but THEN, I remembered a weird little bug from JIRA: Tickets that are created from directly within the JIRA project (hitting the C key, or the + to create a ticket from within the Project) fail to get a "Request Type" assigned to them and this causes all kinds of weird little behaviors.

I logged in as a test user, and opened a ticket from the portal and voilà!! the smart value generated. 

org-filled-in-when-opening-ticket-via-portal.png

 

Long story short: {{issue.Organizations.name}} will work when used in an email template, so long as the ticket source also generates a Request Type (afaik, the only source that does that is Portal).  Phew!

John McKiernan
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 2, 2018

Ah yes, good spot with that Jira bug. 

Glad it's sorted for you :)

0 votes
Firas Amer
Contributor
October 16, 2019

Smart, thanks Rosa for sharing. I think at this point it is not relevant for us. :)

0 votes
Firas Amer
Contributor
October 10, 2019

This does not work for me:

1. configuration: Organization: {{issue.Organizations.name}} ---> result in the email: empty

2. configuration: Organization: {{issue.Organizations}} ---> result in the email: Organization: ServiceDeskOrganizationBean{id='2', name='External test'}

 

Could you please advise? Thanks

Firas Amer
Contributor
October 10, 2019

actually I think it might have been a lower case/upper case issue, now it seems to work.

Rosa M Fossi
Contributor
October 10, 2019

Glad you got it going!  

Out of curiosity, did you happen to notice whether the "Customer Request Type" was filled in those tickets? That's the big hurdle that I ran into... 

Firas Amer
Contributor
October 10, 2019

well, I tested it from the portal, and the request type is already chosen when I filled in a form....maybe this is relevant only if you are testing it from the JIRA. 

I still need to do some further tests though.

Rosa M Fossi
Contributor
October 15, 2019

Yes~ coming from the portal will always fill out that "Customer Request Type".   If I created a ticket from inside / agent-side Service Desk, and forgot to enter the "Customer Request Type", the automation fails.

Side note: to alleviate this, I've setup an automation to automatically populate the CRT using Automation for JIRA (one of the BEST addons out there!).

Firas Amer
Contributor
October 15, 2019

Interesting. We also use Automation for JIRA. Could you please advise how you have set that up in the rule? Thanks

Rosa M Fossi
Contributor
October 16, 2019

Hi Judit, I just chcked my project, and it looks like I'm using JIRA's own automation for this particular workaround.

In this automation, I matched a default Customer Request Type per Issue Type. See screenshot.

automation-customer-request-type.png

 

As you can see, I have a couple of "otherwise" if statements. I think for this Service Desk, I have 7 if statements total.  It only took a couple of minutes to setup. 

note: We do have multiple CRT's that share an Issue Type, so this automation catches "most" of the rogues, but occasionally our agents manually update the CRT. The big problem this addresses is ensuring that the field is not empty and the emails generated by Automation for JIRA don't yield code. 

0 votes
Rosa M Fossi
Contributor
September 28, 2018

We're getting warmer... 

{{reporter.displayName}} from {{issue.Organizations}} has created a new request

 

Yields this mess: :)

email-from-automation-org-not-showing.png

0 votes
John McKiernan
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 27, 2018

Hi Rosa,

 

the smart value you are looking for here is simply {{issue.Organizations}}

 

Let me know if you have any issues with it!

Cheers,

John 

Rosa M Fossi
Contributor
September 28, 2018

That's the first thing I tried.  Maybe I had it all in lower case.  I'll poke at it later today and report back!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events