Hi,
I have a question which is how can I set a field to be required only when I use "Edit" button ? I plan to set it on Behaviours plugin. Therefore, If someone who can let me know how to write a script for this on Behaviors will be better. Thank you very much!
Hello @Kris Han
To use workflow conditions like in @[deleted] example, you need to provide workflow that your issues use in behaviour settings
But preferable to rule conditions in the code, in this case behaviour not depends on workflow and you can use behaviour on different issue types and workflows
See code bellow:
if (getActionName() == null && underlyingIssue.status.name == "Open"){
getFieldById("comment").setRequired(true)
}
Hi @Kris Han,
As the behavior configuration is associated to project, issue type and workflow it will validate the script during any action that is performed.
If you are looking for ignoring these three field related configurations then try to trigger the script only when getActionName()=="" so that it would skip the transitions.
Please let me know if you need further information.
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted],
Sorry, the thing I want is the filed will be required when I "Edit" issue under specific status. For Example, "Comment" field will be required in "Edit" screen only under "Open" status.
Thank you very much!
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.