Set logged work without worklog entry?

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 12, 2024

I'm working on a custom script to import tickets from another system to Jira.

That other systems has a field "actual effort". It's basically the amount of days someone spent on that ticket.

In Jira this could be translated to a worklog entry. I could make one via the script but there is no relevant date or worklog author.

Hence my question: is there a way to add the total amount of logged work on an issue without worklog entry? Or is "Logged Work" directly calculated from the worklogs.

In this example "Logged" is based on the difference between "Estimated" and "Remaining". But I can not find a way to set this programmatically.Capture.PNG

2 answers

1 accepted

2 votes
Answer accepted
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2024

Anwsering my own question: it is possible by ising

issue.setTimeSpent(myLong)

MutableIssue (Atlassian Jira - Server 9.12.15 API)

1 vote
Marc - Devoteam
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.
December 12, 2024

Hi @Charlie Misonne 

As you mentioned, you are correct.

You need a worklog entry. Logged work is indeed calculated on the worklog entries.

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2024

Hi Marc,

Thanks for your answer.

In the meantime I found a solution:

I missed this yesterday  but there seems to be a method to set the time spent without worklog:

issue.setTimeSpent(myLong)

MutableIssue (Atlassian Jira - Server 9.12.15 API)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events