Hello,
I'm trying to create a condition in a workflow but I can't figure out how & where.
This is what I'd like to achieve:
If reporter is in project role ''X'' then only user within project role ''Y ''can execute the transaction.
Tks for your help
As @Robert Wen_Cprime_ and @Jack Brickey correctly point out, you will need some kind of add-on.
The condition you're seeking will not actually be created with a script, but through Jira Expressions, as this is how Jira Cloud implements conditions.
Add-ons like ScriptRunner, JMWE, JWT, Cloud Workflows, and Power Scripts all use Jira Expressions and have different interfaces to help you build your own (or in some case have templates/recipes/etc.)
I've written a quick introduction to Jira Expressions here:
https://community.atlassian.com/t5/Jira-articles/Jira-Expressions-But-Why/ba-p/1694545
In the JMWE "Use cases for conditions", I found this example which might give you a start:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think for what you're trying to achieve, you're going to have to make sure you have an app that accepts scripting such as Scriptrunner. That then gives you an option to select the script when you select the Condition link when editing a Transitition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to do this within the workflow you would need an addon, e.g. JWME, Scriptrunner. etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manon Bourgeois ,
as Darryl has already written, you will currently only be able to implement this in conjunction with an additional app.
Unfortunately, I can only tell you whether this can be implemented with Jira Workflow Toolbox (JWT). However, this use case can be implemented without any problems, as far as I have understood correctly.
For this you can use a Jira expression condition from JWT:
issue.reporter.getProjectRoles(new Project(issue.project.id)).map(p => p.name).includes("X") ? user.getProjectRoles(new Project(issue.project.id)).map(p => p.name).includes("Y") : true
You can find our documentation on Jira expression mode at: Documentation Jira Workflow Toolbox Cloud - Jira expression mode
If you have further questions, don't hesitate to contact us via xApps Support Portal .
Cheers,
Frank
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.