Hi,
I am trying to create a script which compare multi line text to some custom field text:
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.component.ComponentAccessor;
def field = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Fix Description")
def effortText = issue.getCustomFieldValue(field)
def originalText = """\
Please use this checklist to provide relevant information:
1. Describe fix both at product level and technical level.
2. Validation guidelines –provide precise instructions (preferable at product level).
3. In validation instructions also consider regression guidelines (affected areas). What customer use cases should be tested due to the fix
"""
log.setLevel(org.apache.log4j.Level.DEBUG)
log.debug("${effortText}")
log.debug("${originalText}")
if (effortText == originalText){
return 1
}
At the Logs tab I get that effortText = originalText ,but at the result tab its not returning 1 , just null.
Please help