I am trying to create an issue from a transition.
This is trying to replicate the branch statements in the original Jira automation.
I want some fields to be edited when the final linked issue has been created using the post-creation script
{% if issue | parentIssue | field("fields['Transfer']").value == "Biannual" %}
{% set issue.fields["Start Date"] = date('add',6,"Months") %}
{% elif issue | parentIssue | field("fields['Transfer']").value.value == "Annual" %}
{% set issue.fields.customfield_10089 = date('add',1,"Years") %}
{% else %}
{% set issue.fields.customfield_10089 = date('add',2,"Years") %}
{% endif %}
The script is supposed to edit the start date on the newly created linked issue and set it to the current date + 6 months, 1 year or 2 years based on the value of a field (Transfer) in the parent ticket.
I am not able to get this to work.
Any help will be appreciated.