How to achieve when issue is moving to validation state and a specific field should become mandatory , and how to execute this in behaviour ?
Sample
const abc = getFieldById("customfield_000');
const xxx =getFieldById('customfield_000')
const abcValue = abc.getValue();
if (abcValue == "yes"&& actionName === "Validation") {
xxx.setRequired(true);
}
Could help me on this ?
Hi @Syed Nawaz !
Behaviours feature is now supported on Transition View in Jira Software. You can check the details of this first release, supported fields as well as demo videos here.
Best regards,
Andrei
Hello @Syed Nawaz
Welcome to the Atlassian community.
What is the Type of the project? Get that information from the View All Projects page under the Projects menu.
Is there a specific reason you want to do this with a behaviour rather than using a Validator in the workflow transition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Project type is Company-managed software. yes am aware of validator and its why because i can easily achieve this same in Jira data center, so i want to replicate it in jira cloud behaviours through script runner.
Could you help me here ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Syed Nawaz
According to the Behaviours documentation, behaviours are supported on the Create Issue and View Issue screens. I don't believe you can create a behaviour that will be applied during a transition.
Your requirement appears to be that you want to require field A during the transition only if field B has a specific value. Is that correct?
You could use ScriptRunner in a Validator to achieve your requirement.
https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/validators
As mentioned in that document you will need to use a Jira Expression instead of the scripting that you are familiar with from Jira DC.
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.