Forums

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

In Cloud servicedesk can I assign multiple organizations to an issue at creation time?

Jay Keck
Contributor
March 28, 2019

I have a servicedesk project setup where sometimes I'd like to automatically share it with one organization, and other times with 2 organizations. I'm using JMWE toolkit, so I wrote Post logic to do this, but only one organization seems to be getting the auto-notify at issue creation time even though 2 organizations are shown on the UI display. Does jira only recognize the 1st organization when sending created notifications? The servicedesk "Share with picklist field just seems to allow you to choose one organization, so I'm wondering if that is a limiation no matter how many you put in behind the scenes.

Thanks,

Jay

1 answer

0 votes
David Fischer
Community Champion
March 28, 2019

Hi Jay,

the problem with Jira Cloud is that post-functions implemented by add-ons (apps) are asynchronous, which means that they run after the transition (or issue creation in your case) completes. And thus the built-in issue notification is not sent to the organizations you add through the post-function.

The only solution is to use an Email Issue post-function to send your own notification to the additional organizations.

Jay Keck
Contributor
April 29, 2019

Hi David,

One last question on this, in the JMWE option to send email, one option  is to send to watchers. does 'watchers' include organizations as well as requested users, or is organization excluded from  'watchers' in this case?

Thanks,

Jay

David Fischer
Community Champion
April 29, 2019

Hi Jay,

"watchers" only include... watchers, i.e. users who are on the Watchers list.

To send to organizations members, you need to use the Users from template option with a rather sophisticated template that iterates over organizations, and for each organization, gets the members of that organization (using the usersInOrganization filter) and finally lists all accountIds:

{% set users = [] %}
{% for org in issue.fields["Organizations"] %}
{% set users = users.concat(org.id | usersInOrganization) %}
{% endfor %}
{{ users | join(",","accountId") }}
Jay Keck
Contributor
April 29, 2019

Thanks David. As the result of reading about organizations/service desk and their notification limits(if I understand it correctly) for new comments events, I think I'm going to switch over to groups for my use case. I just wanted to have an email sent to all people in organization when a comment is updated/added, but it doesn't seem that easy. I'm just getting the issue creation email sent to everyone.

Regards,

Jay

Suggest an answer

Log in or Sign up to answer