Forums

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

Project automation

João Pedro Neves Ramos Ferreira
July 11, 2022

Hello community members,

I need help...

So I have a project with a name Apoio ao cliente then inside i have categories:

Open, waiting from client answer , carrier.

We create an email only for the carriers. Automation was created.
Most of the emails goes to the right category.
But exist 2 emails that dont go to tag carrier.

When: Issue created

Creator is one of:
(is this fiel i insert all the email from all carriers)

Then: Edit issue fields

I insert a tag to carriers

 

Best regards,
João Fereira

 

 

 

 

3 answers

1 accepted

3 votes
Answer accepted
David Pinn
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 Champions.
July 2, 2013

This will do the trick:

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib" xmlns:core="jelly:core">
    <jira:GetProjectRoleActors projectkey="ABC" projectroleid="10001" var="roleactors" >
        <core:invoke on="${roleactors}" method="getRoleActorsByType" var="groups">
            <core:arg type="java.lang.String" value="atlassian-group-role-actor" />
        </core:invoke>
        <core:forEach var="actor" items="${groups}">
            ${actor.group.name}
        </core:forEach>
    </jira:GetProjectRoleActors>
</JiraJelly>

Of course, you'll need to specify your own project key in place of my 'ABC', and you'll need to use the correct projectroleid in place of my '10001'.

rahulkhire
September 5, 2013

David,

Is there a similar way of getting just the Users in a particular role and getting their User Ids. I am trying the below script, I get the users but they are in the form of [user1:1] How can I get just the user name? I tried actor.users.name, actors.users.id.

<jira:GetProjectRoleActors projectkey="ABC" projectroleid="10002" var="roleactors" >
	<core:invoke on="${roleactors}" method="getRoleActorsByType" var="usernames">
		<core:arg type="java.lang.String" value="atlassian-user-role-actor" />
	</core:invoke>
	<core:forEach var="actor" items="${usernames}">
		Testing: ${actor.users}
	</core:forEach>
</jira:GetProjectRoleActors>



0 votes
Jaroslaw
November 4, 2013

To get users you need to do the second loop because {actor.getUsers()} is a Set.

<core:invoke on="${roleactors}" method="getRoleActorsByType" var="users">
  <core:arg type="java.lang.String" value="atlassian-user-role-actor" />
</core:invoke>

 <core:forEach var="actor" items="${users}">
   <core:forEach var="user" items="${actor.getUsers()}">
     Name: ${user.getName()}, Display Name: ${user.getDisplayName()}, Email: ${user.getEmailAddress()}
  </core:forEach>
</core:forEach>

0 votes
rahulkhire
July 2, 2013

Perfect! Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events