Hi community,
I'm trying to calculate the sum of two custom fields with a time entry like: 1w 5d 3h 2m and 13w 3d 19h 58m.
Here my code:
import com.atlassian.jira.component.ComponentAccessor;
def customField1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_11111");
def customField2 = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_22222");
def value1 = (String)issue.getCustomFieldValue(customField1);
def value2 = (String)issue.getCustomFieldValue(customField2);
return value1 + value2
But the result is: 1w 5d 3h 2m13w 3d 19h 58m
How can I get the right sum of: 15w 1d 23h?
Greetings,
Peter