validator scripts not working with the bulk close operation

Saravanan Subramanian October 15, 2016

Hi All,

I have the following script added to the workflow validator conditon during the close operation. This works only when i try to close a single issue but not during bulk close.

 

Please help me out

def demoSelect = getFieldByName("Reason for Closure")
def demoMultiTxt = getFieldByName("RRM Ticket")
// Get the Value of the Select List Field
def selectedVal = demoSelect?.getValue()
if (selectedVal?.toString()?.equalsIgnoreCase("Risk Accepted")) {
    
               demoMultiTxt?.setRequired(true)
} else {
                    
                demoMultiTxt?.setRequired(false)
}

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2016

You say "workflow validator condition", but that's unclear.  Is this a condition OR a validator?

Actually, it looks more like a behaviour though - if that is the case, then it won't work.  A behaviour like this makes the field mandatory for the user on the front end, via the browser.  They have no effect on bulk-edits - there's nothing to "set required" there.  A validator could be coded to check the input is valid though, that would catch any broken bulk-edits.

Saravanan Subramanian October 15, 2016

Thanks - is there any other way i can achieve that feature during the bulk edits

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2016

What feature?   I already said you need to add a validator if you want to block unwanted bulk-edits.

 

Saravanan Subramanian October 15, 2016

Hi , Sorry - i want to make a field mandatory based on the value from select list. I want that to happen during the bulk edits.

 

Is it possible?

Saravanan Subramanian October 15, 2016

Thanks for your help. I am able to find a way to make it work on the bulk edit option using your answer above

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2016

> want to make a field mandatory based on the value from select list.

Add a validator to the transition

Suggest an answer

Log in or Sign up to answer