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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,456,290
Community Members
 
Community Events
176
Community Groups

Copy system field into custom field

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

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

AggregateTimeSpentSystemField.getDuration(issue)

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
TAGS

Atlassian Community Events