Hi Atlassian Community!
I wonder how I can get the project lead of an issue in a workflow condition with scriptrunner. I know scriptrunner only supports expressions and no API calls in conditions in Jira Cloud.
But I'm unable to fetch the project lead. My goal is to only allow a certain transition by the project lead.
I tried this and other variants but none of them work
user.accountId == project.lead.accountId
Any help is appreciated!
Thanks for your answer. Indeed it's not in the docs so I'm hoping someone in the Community has a workaround.
I simply want to restrict a transition for the project lead. Sounds easy but on Cloud it's not...
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.
@Charlie Misonne it won't work either, since JMWE, just like ScriptRunner and any other Cloud app, can only use Jira Expressions for Conditions and Validators.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right thanks for pointing that out David. I had Jira server in mind again.
Found a feature request for the project lead condition JRACLOUD-10793 More than 15 years so it's not very promising...
For the expression I didn't find any feature request yet. Any idea if this should be created in ecosystem.atlassian.net or jira.atlassian.net ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be created on ecosystem.atlassian.net, in the ACJIRA project, "Jira Expressions" component.
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.
A bit late to the party :-)
But I was looking for the same thing.
I found this worked as a Validator:
user.getProjectRoles(project).map(p => p.name).includes("Project Lead")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bert,
Thanks for bringing this topic back up.
In the meantime my feature request has been resolved and the project lead is available via expressions according to the documentation.
https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference/#project
I haven't tested it to be honest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Charlie,
It looks like this was covered by a different post: https://community.atlassian.com/t5/Jira-questions/solved-Set-Project-Lead-with-Groovy-Script-Runner/qaq-p/1322400. Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joshua,
Thanks for your answer but that post applies for Jira server and the Jira Cloud scripts are totally different.
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.