Missed Team ’24? Catch up on announcements here.

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

Copy system field into custom field

igor gumush October 8, 2018

Hi,

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

Suggest an answer

Log in or Sign up to answer
1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2018

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

AggregateTimeSpentSystemField.getDuration(issue)

igor gumush October 9, 2018

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 9, 2018

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

TAGS
AUG Leaders

Atlassian Community Events