Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on automation

Rosana Casilli
Contributor
November 13, 2023

Hello all!

 

I am trying to write a event in JWWE in order to evaluate if the field Sprint changes for an issue to a value of an active sprint to set the field label to "NotPlanified" and if the Sprint is not active to set de value of Label to "Planified" 

I have tried this:

{% if {{ issue | sprints("active") | first | field("id") }}>0 %}
{% set issue.fields["Etiquetas"] = "NotPlanified" %}
{% else %}
set issue.fields["Etiquetas"] = "Planified"
{% endif %}

 

But when testing it shows me the following error

 

 

There was an error during the rendering of your template

 

Message:
(string) [Line 1, Column 8]
  parseAggregate: expected colon after dict key
Can anyone help me on this?
Thanks in advance
Ro

1 answer

0 votes
Rosana Casilli
Contributor
November 16, 2023

@Appfire Support do you have any idea on this?

Thanks in advance,

Ro

Melanie Corletto (Appfire)
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 16, 2023

Hi Rosana, I'm Melanie from the Appfire support team; you can check the configuration I set on my end below:

  • Create an "Event Based Action" configured to be triggered with "Issue Field Value Changed."

Screenshot 2023-11-16 at 15.01.04.png

  • Set the event to run the "Set issue Field" post-function with the below configuration (applied to the field you want to set):

Screenshot 2023-11-16 at 15.01.26.png

{% if issue | sprints("active") | first | field("id") %}
NotPlanified
{% else %}
Planified
{% endif %}

You can additionally set a condition for the post-function to avoid the post-function being triggered when the Sprint value is deleted.

Screenshot 2023-11-16 at 15.01.36.png

{{ issue.fields.<sprint field> != null }}

 If you have further questions, you can raise a ticket on our support portal: https://appfire.atlassian.net/servicedesk/customer/portal/11 

Rosana Casilli
Contributor
November 16, 2023

Hi @Melanie Corletto (Appfire) 

Thanks for your answer. I tested it but no matter if it is a active sprint or not it is always assigning NotPlanified.

am I missing anything?

{% if issue | sprints("active") | first | field("id") %}
NotPlanified
{% else %}
Planified
{% endif %}

Rosana Casilli
Contributor
November 16, 2023

Okay I have tested but I have a question.... I want the value to be replaced, any time the sprint is changed from an active to an inactive sprint.

Now the field label is updated the first time I move the issue from one sprint, let say from an inactive to an active, but if I move it from an active to an inactive sprint the value is not changed

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events