Open ptrushin opened 7 years ago
Those are two different API's, the first one is the correct one.
403 effectively means forbidden, so may mean that the user you are creating a work item with has no permission to create a work item, or time tracking is not enabled. Note the work item should also have the correct work item type.
Do you have some more information? What is the call you are making? Do you have time tracking enabled for the project?
Check this unit test for an example: https://github.com/JetBrains/YouTrackSharp/blob/master/tests/YouTrackSharp.Tests/Integration/TimeTracking/CreateWorkItemForIssue.cs
This is not possible yet. Author is always the user who is making the API call, the second API has not been implemented yet in YouTrackSharp (tracking issue #55)
Worst case if you need it now you can call the API manualy, the connection
also exposes an HttpClient
:
var client = await _connection.GetAuthenticatedHttpClient();
(and if you happen to go that route, a PR to resolve #55 is only a bit more work ;-))
When I try to create WorkItem with Author field I get an exception
I think it is because method CreateWorkItemForIssue in YouTrackSharp.TimeTracking.TimeTrackingService call
And in documentation api youtrack I see for this call that is has no author
I think it must be a call with author, described in
but I can't find it in YouTrackSharp