Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Copy system field into custom field


I'm trying to  copy system field (id = aggregatetimespent ) into a custom field using script field.

As I understand getCustomFieldObject is only good for custom fields

and getFieldById saying "can't find matching method".


So how can I get the value of a system field in a "Custom Script Field"?


1 answer

1 vote

If it were just the time spent on the current issue, then you could use issue.getTimeSpent()

But the aggregates are not tied to the issues.  You'd need to use something like


The problem is that for a story I need to get it also from all the sub issues.

It's possible but I trying to understand it there is just a way to get the value from the system field.

Yes, that call I mentioned should fetch it for the issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

78 views 1 6
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