Hi
the requirement is below
1 # Need to add validator to Linked issue.. where if i move the status to Early Adopter it has to validate cf values from (is related by ) linked issue.
all Custom Fields i want to validate in Linked issue ref ( Screen Shot _ Linked )
2# If the Required Scan type = 'Static Scan' (Text field ) then it has to validate Next Full Static Scan due (Date picker ) with current system Date. ( ref Screen shot_Required Scan
Is Related by
Not Added the Linked issue function
import com.opensymphony.workflow.InvalidInputException
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.issue.CustomFieldManager
import java.util.Date.*
def REQUIREDSCANTYPE = 33604 as long
def NEXTFULLSTATICSCANDUE = 28546 as long
//get Custom Field value
def RequiredScanTypeCustomField = CustomFieldManager.getCustomFieldObject(REQUIREDSCANTYPE)
def RequiredScanTypeValue = issue.getCustomFieldValue(RequiredScanTypeCustomField)
def NextFullStaticScanDue = CustomFieldManager.getCustomFieldObject(NEXTFULLSTATICSCANDUE)
def NextFullStaticScanDueValue = issue.getCustomFieldValue(NextFullStaticScanDue) as Date
//Today date
def today = new Date()
//LOGIC for Required Scan type
if (RequiredScanTypeValue == 'Static Scan'){
NextFullStaticScanDue(before.(today))
}
else{
throw new InvalidInputException("Static Scan must be vaild")
}