Have tried both of these with no luck. Simply trying to minus one custom field from the other im not sure on the correct command to get the value.
@Formula:
if (issue.get("customfield_10251").getvalue == null || issue.get("customfield_10250").getvalue ==null)
return 0;
return (issue.get("customfield_10250").getvalue - issue.get("customfield_10251").getvalue)
-->
@Formula:
if (Issue.getCustomFieldValue("customfield_10251") == null || Issue.getCustomFieldValue("customfield_10250") ==null)
return 0;
return (Issue.getCustomFieldValue("customfield_10250") - Issue.getCustomFieldValue("customfield_10251"))
-->