User Tools

Site Tools


validators

This is an old revision of the document!


Scripted Validators

Following scripts can be used for scripted validators within the workflow

Verify project name

issue.projectObject.name == "My First Project Name"

Require Value in FIELD2 if FIELD1 = 'Yes'

if ( cfValues['FIELD1']?.value == 'Yes') { 
    if ( cfValues['FIELD2'] ) {
        return true
    } 
    else return false
     }
 else return true

Require Value in DATEFIELD2 greater than "NOW" if FIELD1 is set

Date today123 = new Date()
if ( cfValues['FIELD1'] ) { 
    if ( cfValues['DATEFIELD2'].getTime() > today123.getTime() ) {
        return true
    } 
    else return false
     }
 else return true
validators.1497554005.txt.gz · Last modified: 2017/06/15 15:13 by pawel