Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JSD allow user to create issue without filling mandatory cascading field

Neeraj Kumar May 5, 2021

JSD allow user to create issue without filling mandatory cascading field.

If first level LOV is filled user able to create the issue even if the field is mandatory.

We need both level of cascading must filled. 

 

Custom field cascade.PNG

2 answers

1 vote
Callum Carlile _Automation Consultants_
Community Champion
May 6, 2021

Hi @Neeraj Kumar - looking at this Atlassian ticket, it's considered to be 'outside the scope of the custom field' by Atlassian, so it looks like this won't be changing.

Having said that, this community question goes through a whole load of suggestions with how to get around this, such as using the Scriptrunner app to create a scripted validator, as well as some other popular add-ons such as JMWE.

Apologies that this is probably not the answer you were hoping for, but hopefully it answers your question at least!

0 votes
Joseph Chung Yin
Community Champion
May 6, 2021

@Neeraj Kumar -

As stated by @Callum Carlile _Automation Consultants_ , we have used ScriptRunner for Jira (see Marketplace URL below) add-on in our Jira/JSM DC (on-prems) env to enforce the child option for a custom cascade field to be mandatory at issue creation via scripted validator.

https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview

Here are some details for your reference...

1) adding the scripted validator at issue creation.

2021-05-06_8-27-02.png

2) Screenshot of the scripted validator UI

2021-05-06_8-26-38.png

3) The actual script for your reference -

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.opensymphony.workflow.InvalidInputException

def issue = issue as MutableIssue
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Platform/Product")
def cfValue = issue.getCustomFieldValue(cf) as HashMap

def parentOption = cfValue.values().getAt(0)?.value
def childOption = cfValue.values().getAt(1)?.value

if (!childOption) {
throw new InvalidInputException("Child option - Product Cannot Be NULL (None)")
} else
{return true}

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events