I'm trying to compare to numbered fields and want to throw a specific text when the one field are 2 numbers or less away from the other field. I tried with a scripted field to do below but it will not accept the minus i have after field 2
-------------------
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def Field1 = customFieldManager.getCustomFieldObject(00001);
def Field2 = customFieldManager.getCustomFieldObject(00002);
def TFTR = issue.getCustomFieldValue(Field1);
def EH = issue.getCustomFieldValue(Field2);
if (EH <= TFTR - 2) return "Some text 1";
else return "Some text 2";
--------------------
Hope someone can help