Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JMWE - Setting the value of a field with scheduled actions

Hello everyone,


I am trying to automate some reports from Jira, to try and control issues already over budget (Time spent > Original Time Estimate) and try and prevent other issues from going over budget. 

I couldn't do this by simply using filters (as you can't compare two field with JQL expressions) and therefore I had to resort to using JMWE scheduled actions to populate a custom field (which I called, imaginatively, "Over Budget?" - a number only, single line custom field) with two values "0.75" (for issues where time spent is > than 75% of the original time estimate) and "1" (for issues already over budget). I can then create a filter and a subscription on the back of these values to automatically report on whether we are keeping in budget or not.

I then proceed to create the following post functions within the same shared action:


The issue is that the 0.75 one applies to tickets over budget as well and I can't really wrap my mind around why this is happening.

The warnings I am getting are all the same:  "Error while calling Jira REST API. Retrying." - possibly related to time outs due to the high number of issues that need to be crunched by the post functions (> 500) 

I get two different type of errors:

- Unexpected response: 500 (possibly related to the post functions timing out)

- Cannot set property 'issuekey' of undefined (I don't understand this at all tbh)

FYI the scope of the shared action is: 
issuetype = task AND status != done AND originalEstimate > 0 AND timespent > 0

Think there's something pretty obvious I am not seeing - any suggestions on how to get this to work? 



1 comment


one problem is with the syntax of your conditional execution condition. The "AND" should be inside the {{ }}.

Also, you don't need two post-functions for that - instead, you should set the field's value based on the condition:

{% if issue.fields.timespent >= issue.fields.timeoriginalestimate %}
{% elif issue.fields.timespent >= issue.fields.timeoriginalestimate * 0.75 %}
{% endif %}

As for the 500 errors, they are internal Jira errors, and if they persist, you'll need to reach out to Atlassian support so they can investigate.

Also, note that your approach will not fully work, as there is a limit to the number of issues the scheduled action can process, and you'll be reaching it quickly. What you need is "calculated fields", and this is something Atlassian might eventually bring to Jira Cloud.


Log in or Sign up to comment
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,669 views 37 46
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you