Hi!
I have Components field.
and if Components value = Bug i need to make Description (system), Date (custom Date), Select list (Single) as required.
How i can do this?
Hi @Alejo Villarrubia [Adaptavist], I solved it is.
My code, for newbies:
! issue.components*.name.contains ('Bug') || issue.description as boolean ! issue.components*.name.contains ('Bug') || cfValues['Office'] as boolean ! issue.components*.name.contains ('Bug') || cfValues['Date of the bug detection'] as boolean
Thank you so much for cowork!
Hi @Sergey Shcherbakov -
If you want to avoid code, you can use the Update on Transition for JIRA add-on from Bob Swift Atlassian Add-ons which comes with a validator named "Conditioned Validator."
With this, you would:
Please note: The above assumes the Component, Description, MyDate, and MySingleSelect fields are all visible on the transition screen, which is why they are referenced with a prefix of "transition_". If any are NOT on the transition screen, then replace the "transition_" prefix with "original_".
Hope this helps,
Betsy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergey,
You can add a Simple Scripted Validator for each of those fields that checks whether the component has Bug as value or not.
You can find some examples of how to do that in the following snapshot of what will be the new documentation website, which will be released together with the next version of the add-on: https://scriptrunner.adaptavist.com/3.1.5-SNAPSHOT/jira/recipes/workflow/validators/simple-scripted-validators.html
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.