Dear community,
I am currently migrating from Server to Cloud and I do have some groovy based post functions, which I need to translate into Nunjucks.
I need to read some values from a custom field and use it in nunjucks, to do some if/else logic. How do I do that?
I have the Repeating Issue App by codedoers. In Server, there is a specific field with the "Next occurrence", in Cloud this field is missing. I have asked support and they told me, that I can access the information via "com.codedoers.jira.repeating-issues:task".
I am using the JMWE-app for development.
Jira expression
If I use a "Jira expression", I can get the needed information:
issue.properties['com.codedoers.jira.repeating-issues:task']
results in
Your Jira expression ran successfully
Result:
"Object":{
"updatedTime":
"2023-01-20T07:11:47Z"
"updatedBy":
"60815edd9c4625006b35804a"
"action":
"WorkflowStepTask"
"lastExecutionErrors":[]
"recurrenceRules":[
0:"RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=20"
]
"nextOccurrenceTime":
"2023-02-20T06:41:54Z"
}
issue.properties['com.codedoers.jira.repeating-issues:task'].recurrenceRules[0]
results in
Your Jira expression ran successfully
Result:
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=20"
Nunjucks scripts
If I try to use this in Nunjucks expression, I am not getting anything back.
{{ issue.properties['com.codedoers.jira.repeating-issues:task'].recurrenceRules[0] }}It just says "Your template ran successfully". No result.
Any help is very much appreciated.
Chris