Hey,
I am using Automation Lite for Jira Cloud and want to create a rule to automatically log work.
I have a custom field (date/time) cf10049 in which agents can set a date for an appointment with a client.
I have another customfield (text) cf10067 in which the agents can log their travel time (in minutes). standard: 0
And another textfield cf10068 in which agents log their work time (at the client's site) in minutes. standard: 0
Now, I've set up a rule to log forward travel:
trigger: cf10049 changes
if: cf10067 !~ "0"
then: log work:
time spent: {{issue.customfield_10067}}mdate started: {{issue.customfield_10049.minusMinutes(issue.customfield_10067)}}work description:
Hinweg: {{issue.customfield_10067}}
Logged: {{now.convertToTimeZone("Europe/Paris")}} by {{initiator.displayName}}
the "date started" function does not work
and i don't know why.
if I enter: {{issue.customfield_10049.minusMinutes(X)}} with X being a random number set from me. It works just fine.
If I let the program show me {{issue.customfield_10067}} it shows me the right value for the field. Now I don't know why I doesn't work in combination.
Can someone please tell me what my mistake is?
i used a textfield instead of a number field, because the numbers returned from a number field are double and I need integers. therefore, it should actually work with a textfield.
ps. for the way-back travel it is:
date started: {{issue.customfield_10049.plusMinutes(issue.customfield_10068).plusMinutes(issue.customfield_10067)}}doesnt work either..
for the right methods I was searching here: https://docs.automationforjira.com/working-with-issue-data/date-functions.html#manipulating-dates