Forums

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

Problem with automation updating custom field

Owen Vachell March 11, 2025

I've added a custom field called "Status updated". Then created an automation to populate that field with issue.updated whenever that field value is changed. 

The trigger seems to work according to the logs but updating the field does not. 

I've included a screenshot of my automation and pasted the output from the logs at the bottom. Is anyone able to see what I'm doing wrong here.

Note: I've tried using the custom field ID and the name of the field. Both give the same error.

Screenshot 2025-03-11 at 13.11.46.png

Log output:

 

Edited issue successfully, however some of the set fields aren't available. Fields ignored:
Status updated (customfield_10193)
Unable to find any issue field values to edit:
CW-11

1 answer

0 votes
Walter Buggenhout
Community Champion
March 11, 2025

Hi @Owen Vachell and welcome to the Community!

Have you added the field to the edit issue screen for the issue type you are trying to update? Jira can only edit fields if they are on the edit screen.

Hope this helps!

Owen Vachell March 11, 2025

Thanks for your reply. I don't see any screens that my project is using. Currently unsure if this makes a difference but this is in Jira Product Discovery. Reason I mention it is because I also can't see my custom field if I go to the main Issues settings page. Even though it's there in my JPD project. I wonder if JPD supports what I'm trying to do.

I was sure I selected a company managed project when creating this. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2025

Hi @Owen Vachell -- Welcome to the Atlassian Community!

Adding to the suggestions from @Walter Buggenhout ...

You note this is for a Jira Product Discovery (JPD) project.  What type of field is this and where was it added?

  • JPD only has its "date" type field (which is a JSON representation of a range of dates), and
  • JPD cannot add global date / time fields currently.

And so if this a JPD "date" field, the time cannot be saved from {{issue.updated}}.  A workaround would be to store the value as text and convert it to date / time when needed.

Kind regards,
Bill

Owen Vachell March 12, 2025

Hi @Bill Sheboy and thank you.

I've been doing some digging and starting to realise this. Thank you for confirming.

My ultimate aim is to have a column that tells me how long an issue has been sitting in its current status. So, for example, if something has been sitting in its current status for 90 days, it's an indication we either need to decide it's not important enough or make an effort to decide where it fits in the roadmap. 

Do you know if this is in anyway achievable. Unsure if I'm going about this the right way. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2025

Thanks for those additional details, Owen!

For a JPD project, doing what you ask would require two custom fields and two automation rules:

  • two custom fields:
    • one text custom field to store the date / time of the last status update; let's assume its name is StatusLastChanged
    • one number custom field to display your running day count; let's assume its name is DaysInStatus
  • the first rule is:
    • triggered on a status change
    • updates StatusLastChanged to {{now.jiraDateTime}}
    • resets DaysInStatus to 0
  • the second rule is:
    • triggered on a daily schedule, with JQL for the Ideas of interest
    • updates DaysInStatus the running days count between the first field and now: {{issue.StatusLastChanged.toDate.diff(now).days}}

One challenge with this approach is if Ideas go backwards in flow, the count is reset and not cumulative for the time in an earlier status.  To do that, you would need a marketplace app to better track the time in status for a JPD Idea project.

Owen Vachell March 13, 2025

Thanks again @Bill Sheboy I was starting to go a similar route. But with just one integer field and an automation that sets it to zero on status change and another to increment it by 1 every day. 

However, my biggest issue at the moment is that the automation still can't find my custom field. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2025

Would you please post images of:

  • your complete current rule, including the details at the top showing the scope, and
  • the audit log showing the rule execution with all the areas at the right arrows > expanded?

Those may provide more context for why the field is not found.  Thanks!

Owen Vachell March 14, 2025

note: I've changed "Days in status" to "Weeks in status" to reduce the number of automations I'm running.

Screenshot 2025-03-14 at 09.49.34.pngScreenshot 2025-03-14 at 09.50.12.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2025

The likely cause is the JSON syntax is incorrect, even though the error message does not state that specifically.

If that field is a number type, here is the correct syntax for the JSON:

{
"fields": {
"Weeks in status": 0
}
}

 

Owen Vachell March 14, 2025

That's how my JSON looked in my OP. I was experimenting with both formats. Same result.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2025

Is the the field a number type?

One last thing to try: change the JSON to use customfield_10225 rather than the field name.  Rules can get confused by duplicated field names / smart values when they are in different scopes: e.g., global versus team-managed (TMP) versus multiple TMP projects.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events