Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,981
Community Members
 
Community Events
176
Community Groups

i have one radio button YES/No If i am selected Yes then my checkbox should be mandatory in jira

I have one radio button YES/No If i am selected Yes then my checkbox should be mandatory in Jira

2 answers

1 vote
John Funk Community Leader Jul 23, 2022

Hi @ssabanam11  - Welcome to the Atlassian Community!

The only way I am aware of to do something like this is with the Behaviours add-on by ScriptRunner. 

kindly share the script for check box .

 

Tried it below but not working

 

COTS Dependency   -----It is radio button

System Providing Service --- it is checkbox 

 

Description :- if someone select COTS Dependency Yes then check box field should be checked by user at least one option  during create option 

 

Script.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.onresolve.jira.groovy.user.FormField
import org.apache.log4j.Category

if (cfValues['COTS Dependency'] == 'Yes') {

cfValues['System Providing Service'] !=null
}
else
cfValues['COTS Dependency'] != 'Yes'

0 votes

I don't understand the goal...

kindly share the script for check box .

 

Tried it below but not working

 

COTS Dependency -----It is radio button

System Providing Service --- it is checkbox

 

Description :- if someone select COTS Dependency Yes then check box field should be checked by user at least one option during create option

 

Script.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.onresolve.jira.groovy.user.FormField
import org.apache.log4j.Category

if (cfValues['COTS Dependency'] == 'Yes') {

cfValues['System Providing Service'] !=null
}
else
cfValues['COTS Dependency'] != 'Yes'

If You is using a groovy post function, You could to do it with InvalidInputException class. Below an example if a != b.

import com.opensymphony.workflow.InvalidInputExceptionimport 
if (a != b){
    def error = new InvalidInputException("Error message")
    throw error
}

 

Like ssabanam11 likes this
Like Rafael Costa likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events