1- is it possible to delete a worklog?
2- is it possible to update a worklog details i.e spent time?
3- how we can pull the updated worklog via API to get the new/updated worklog?
Welcome to the community!
The endpoint API to delete the worklogs is:
DELETE /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
CURL example:
curl --request DELETE \
--url 'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/worklog/{id}' \
--user 'email@example.com:<api_token>'
Different examples can be found in the documentation sent above.
The endpoint for the update is:
PUT /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
For the usage possibilities, you can review the documentation here.
As for the third question, it is possible to pull the worklogs using the endpoint:
GET /rest/api/3/worklog/updated
curl https://your-jira-url.atlassian.net/rest/api/3/worklog/updated?expand=properties \
> -u greg@example.com:gregs_api_token
In the same way, you can use the since parameter to show data from the specific timestamp.
curl https://your-jira-url.atlassian.net/rest/api/3/worklog/updated?expand=properties&since=1672527600
-u greg@example.com:gregs_api_token
Using this you receive JSON data containing worklog properties.
The details about this endpoint can be found here.
I hope that helps.
Cheers!
Gracjan
thank you for your reply, in fact i have used the /rest/api/3/worklog/list?expand=properties to provide the full list of worklogs , however am not able to importing the data by ID or By id and Issue ID or by ID/Issue ID and Started Date
However also this API missing the Issue Key, so not sure how to resolve the duplication, but mainly what is the primary key of this table ?
check the below SSIS Issue received:
System.Exception: Duplicate key found in source data. To avoid this error Set Duplicate Handling on Advanced Tab or remove duplicate from source data and try again. ERROR: Violation of PRIMARY KEY constraint 'PK_Worklogs_Temp'. Cannot insert duplicate key in object 'dbo.JIRA_Worklogs_Temp'. The duplicate key value is (11274, 21170, Oct 27 2022 3:00PM).
The statement has been terminated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey guys,
The since parameter in query string isn't working for me. It always return workload from the beginning of time of the instance.
Endpoint:
rest/api/3/worklog/updated?since=1693245600
Need help to figure this out. I need to pull the all the worklog given yesterday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Issam Gebara and welcome to the community,
Let me know if the above helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Alex Koxaras _Relational_ for your quick feedback , i have check the project permission and see the Edit/ Delete Own worklog is enabled, so let me clarify what i have done:
I have designed an SSIS job to pull the worklog using Zappy's SSIS PowerPack,what i need to do is perform an incremental worklog logs and main needs is to get the the deleted worklogs / created-updated worklogs
so i get the last updated date from my stored DB Data and based on this i called the API with a JQL worklogdate >= "-4d" where 4 can be 5 or 1 ...however in the reply am not getting worklog as response from the API and am receiving CreatedDate/Updated that belongs to 1 month back
after troubleshooting the fiddler JSON Response i came to know that the API will give all the worklogs when i.e a comment is being added but it does not filter on the recent worklog updated so my inquiry is how i can get only the updated worklog data and not the whole time entries specified on a specific issue id
what is the formula or expression that i can use in JQL to get only the created / updated time entries?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.