Not able to set time tracking for the task owner using java
There is a restriction that only the owner of the workitem can edit the time tracking tab, keeping that restiction in place, can we edit the time tracking tab as the owner of the workitem using java. I tried this piece of code but not able to edit in UI and also doesn't throw any error.
entry.setCreator(workItemHandle.getOwner());
entry.setStartDate(now); entry.setTimeSpent(twoHours); entry.setTimeCode(timeCode.getTimeCodeLabel()); entry.setTimeCodeId(timeCode.getTimeCodeId()); entry.setWorkType(workType); |
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Mar 26, 3:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER I wrote this back in the day: https://rsjazz.wordpress.com/2015/03/31/the-work-item-time-tracking-api/ Namrata K selected this answer as the correct answer
Comments
Hi,
I have gone through this link already but still not able to resolve the issue keeping the restriction in-place.
Ralph Schoon
commented Mar 26, 4:45 a.m.
| edited Mar 26, 7:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There is no real information in your question, the code is as incomplete as possible. The error description is lacking any useful detail.
The Link I provided and the links to the team wiki contains the information you need to enter time tracking information.
If you are running in the client API, and you do not have the permission to write the data, then you don't have the permission to write the data. The only things you can try is to run with another user e.g. JazzAdmin role and hope there is an override, or give yourself the permission, if it is configurable. If you run in a server extension it is technically possible to elevate to run as an administrator.
Namrata K
commented Apr 08, 9:54 a.m.
Got it, thank you |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.