1

I'm trying to figure out a way to identify a group of projects in JQL so that we don't have to go in an manually update several filters when we add a project to it.

It seems like the way to do this would be project in projectsWhereUserHasRole("MyRole"), but that's not returning anything.

I've created a custom role, created a user group assigned to that role (with 3 users in it, including myself), adding that role under the 'Project Roles' section of the Project Administration for one of the projects, created a custom permission scheme with that role assigned to have every permission, assigned that permission scheme to that project...

And still my JQL returns empty results.

What am I doing wrong, here?

3 Answers 3

1

Any reason for not using recursive filters? This is really handy and reduces a lot of maintenance overhead.

Example:

  • Create a filter "MyProjects":

    PROJECTS IN (PROJA,PROJB, PROJC)

  • Create a filter "MyNarrowWatchlistFromMyProjects"

    FILTER = MyProjects AND Watcher = currentUser()

  • Create a filter "ItemsIShouldLookAtFromMyNarrowWatchlistFromMyProjects"

    FILTER = MyNarrowWatchlistFromMyProjects AND updatedDate < startOfWeek(-2)

Then, next time a new project is added / removed from the list, you just need to update one filter and it'll apply recursively. Neat and elegant.

You might want to use a better naming pattern than the one presented, though. :)

It's nice you have presented your problem rather than only the question - The problem you're facing is a recurrent one. Using recursive filters saves a lot of time.

0

Not really as good as what I was hoping for (and thus I'll hold off accepting this Answer, still hoping someone can figure out how to make projectsWhereUserHasRole work), but as a workaround, you can instead use project in projectsLeadByUser(MyDummyUser), and then create a new user named MyDummyUser (with no groups so it doesn't take up any licenses) and assign that user as the Project Lead for the projects you want grouped together.

Downside is you then can't make use of the Project Lead field for anything else, since it's not a real user.

0

This works on standard catalog of permissions taken from permission scheme (company managed projects). To see those permissions you need to be an admin and go to permission schemes: yourJiraDomain/secure/admin/ViewPermissionSchemes.jspa or try https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/

project in projectsWhereUserHasPermission("Administer Projects") works for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.