You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello everyone,
I have the following problem not only when creating a ticket, but also when editing a ticket in the future after creating it.
Field 1 (single select field) has a minimum of four values, say A, B, C, D, E, and in case A, B or C is selected, Field 2 (Date field) must not be empty and must be filled with a date, and Field 3 (Text Field) must also not be empty. If the value D or E is selected, these two fields may be empty.
Is this possible to do?
Best regards
I would add a scripted JMWE validator with the following script:
if (issue.getRawValue("customfield_SINGLESELECT_ID")?.value in ["A", "B", "C"])
{
issue.get("customfield_DATEFIELD_ID") != null && issue.get("customfield_TEXIFIELD_ID") != null
}
On the above code replace the ID of the custom fields with your IDs.
Let me know if you managed it!
@Alex Koxaras _Relational_ Hi,
thx for your time mate.
Scripted (Groovy) Validator
my script isnt working for some reason he doesnt chk the value in the field
if (issue.getRawValue("customfield_16100")?.value in ["R", "G", "P"])
{
issue.get("customfield_13651") != null && issue.get("customfield_13203") != null
}
I have to choose a For filed Box, what should i pick there or leave it empty?
I am not sure why doesnt work. Can you help me here some more?
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jurica Petricevic I dont understand the "I have to choose a For filed Box". Try to do a validation of your script first:
And paste an image of what you are getting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras _Relational_ we needed
else true
now it works.
if (issue.getRawValue("customfield_16100")?.value in ["R","G","P"])
{
issue.get("customfield_13651") != null && issue.get("customfield_13203") != null
}
else true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You got to hold on to that promise @Jurica Petricevic! 🍺🍺🍺🍺
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.