Hi,
I want to make this field required through workflow validator, but i want to target it for only specific projects and issue types within those projects.
What would be the best way to do this? Also, if i want to add a condition within that field required validator to only target specific project and issue type then what would be the query for it.
I have done this in one another project and it works fine but it works for that project is because the issue type is associated with its own workflow and i only had to write the condition to target the project which i was able to do, but for my other projects 4 issue types are using this one workflow which is shared with many projects so i am having a hard time trying to figure out the condition for it.
Hi @Spruha Shah
When possible it's easier to use a dedicated workflow for your project and issue type instead adding complexity in the current workflow using conditions.
If you want to use condition you should be able to use something like that:
return
(issue.get(
"issuetype"
).getName() ==
"XXX" && issue.get("project").getKey() == "YYYY"
)
Regards
Thank you for your response.
How would i write this condition if i was mentioning multiple projects or issue types?
would it be this:
return
(issue.get(
"issuetype"
).getName() ==
"XXX","YYY" && issue.get("project").getKey() == "YYYY","XXXX"
)
if you can look at how i added "YYYY" in first line and "XXXX" in second line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try
return
(issue.get(
"issuetype"
).getName() in [
"XXX","YYY"] && issue.get("project").getKey() in ["YYYY","XXXX"]
)
Regards
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.