Hi all,
Here's a fun one.
A customer of mine has the global permission for Create Team Managed Projects set to everyone (default) and the Jira Admin is frustrated that people are creating TM projects and leaving the Access setting to Open - they also have their own external customers accessing their instance so there's a potential privacy/data breach risk here.
I suggested that they limit the create TM project permission to a defined Group instead of having it open, but Product Ownership of Jira is hazy and no-one wants to make the call.
The admin's preference for now is to somehow be alerted whenever a TM project is created and the Access permission set as Open.
I couldn't figure out how to do this, but my best attempt was an Automation Rule.
I figured that I could use:
Trigger:
When a Project is Created
Condition:
And the user is not in group administrators
Action:
Email (the jira administrator) with the newly created project key at the end of a browse project URL
This way whenever anyone who isn't a Jira Admin who creates a Project (ie a Team Managed Project) the Jira Admin will get an email with an easy link to click.
It'll give them some metrics to work with (e.g. "there were 30 vulnerable projects created last week!!") so over time they can make a data-driven argument about changing the Team Managed permission.
Turns out that the "When a Project is Created" trigger requires a Branch, so I used a JQL query to say that the newly created projectkey didn't match an existing one that I picked out at random.
Problem here is that it found almost 60k issues and throttled on execution.
Can anyone think of a better way to determine if a Project is a Company Managed Project or a Team Managed Project using JQL?
Similar to this question but the customer isn't currently allowed/authorized to change the Create Team-Managed Projects permission
Hi @Mike Clarke ,
this is indeed possible, but a little bit of automation magic is needed 😉
When creating a project, you could use the smart value {{project}} and get the id from it via {{project.id}} We can now use this id to query the Jira REST API and get the style (next-gen or classic) of the newly created project.
The rule should look like this (+ your mailing stuff, and checking the response for next-gen)
It's important, that the REST call needs authorization. Without you will get a "not found" response.
Hi @Kai Becker
Wow this is fantastic!
I don't usually play with APIs etc so will ask around internally for a bit of help but this looks very promising. I'll make sure to hit Accept once I've tested this
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.