The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Adaptavist ScriptRunner.... Can I query using team as a field.

border_water
November 8, 2019

Hi,

I would like to query for all sub-tasks in a team Team-A.

Can I do this by using scriptrunner ?

 

Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Jack Brickey
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.
November 8, 2019

it depends on what you mean by "in a team", e.g. do you mean assigned to someone in Team-A. Likely you can achieve w/o SR...

assignee in membersOf("Team-A")

border_water
November 8, 2019

Yes, i mean to query any sub-task assigned to a member in a team called "Team-A".

so the JQL should be:

type = sub-task and assignee in membersOf("Team-A")

am I correct ?

in order to use this JQL, what do i need to do in ScriptRunner ?

Jack Brickey
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.
November 8, 2019

yes that will work. you do not need Scriptrunner at all. just go the the advanced search screen and enter that JQL you have there. That is, of course, assuming you have a group named "Team-A" and the members reflect the users you are interested in.

border_water
November 8, 2019

I do not have a Group, I do have a team.

so what do I need to do in order to do JQL using a "team"... not a "Group"

Jack Brickey
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.
November 8, 2019

sorry...not familiar with "Team" function. Maybe this is a Scriptrunner function? If so then I'm steering you wrong here. :-(