Forums

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

jira automation get pull requests count

Deleted user
March 20, 2023

Hello guys and gals. 

I have the following automation

When Pull Request is merged -> move the task to the DONE state.

 

image.png

 

Sometimes there are could be more than 1 dedicated pull request and I want to check

  • if there are no other open PRs -> then move the issue to the particular state. 
  • if not, i.e. there is still an open PR/s -> then do not move the issue to another state

 

I can't find a way to get the number of open pull requests. Is there a way to do that?

Thanks!

1 answer

0 votes
Nic Brough -Adaptavist-
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.
May 10, 2018

Start with a look at the permission scheme for the project.

There is a rule in there that says "Assignee (who can be assigned an issue)".  It's likely to say something like "Role (Users)"

The users you don't want to have on the list all match that rule.  You need to adjust them, or the rule, so that they do not.

Itay Keller
Contributor
May 10, 2018

I change from 

  • Project role
    • atlassian-addons-project-access
  • Application access
    • Any logged in user

To 

  • Group
    • jira-software-users

 

But it made no difference.

Nic Brough -Adaptavist-
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.
May 10, 2018

I guess those users are in the group jira-software-users as well.  (Previously, the "any logged in user" would have been allowing them in)

Itay Keller
Contributor
May 10, 2018

You are right. They are in jira-software-users. with disabled "Remove user" button.
I don't remember adding them to that list and it seems like now I can't remove them.

Nic Brough -Adaptavist-
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.
May 10, 2018

I suspect they are "app users" - users created because an App (add-on) needs a user.

I would change the permissions to use roles (as they're a lot more flexible).  In this case, assuming you have not done much with permissions yet and are close to default, I would

  • Work out what users you want to be on the assignee list (or identify or create a group for them)
  • Put the users (and/or group) in the role "developers"
  • Change the permissions for "can be assigned issues" to "role: developers".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events