YouTrackSharp 2021.3.0
Breaking changes
- Classes and methods
BearerTokenConnectionrequires auth token that is valid for both Hub and YouTrack -- if you have a Cloud installation or a Standalone installation with built-in Hub, your token is OK unless you have changed default settings during its creation;GetAthenticatedHttpClientwas replaced by two new methods:GetAuthenticatedApiClientthat provides new api methods and should be used most of the timeGetAuthenticatedRawClientwhich could be used for any HTTP calls you wish to implement manually
YouTrackErrorExceptionwas replaced byGenerated.YouTrackErrorExceptionwhich has more properties and contains different error messages, responses and statusesIssuesService.AttachFileToIssue(): it's not recommended to use "All Users" group forgroupparameter, since it would fail with exception;IssuesService.GetIssuesInProject(): millisecond resolution ofupdatedAfterparameter is now ignored (value will be rounded down internally to the nearest second);IssuesService.UpdateCommentForIssuenow throwsGenerated.YouTrackErrorExceptionif issue or attachment were not foundUserManagementService.GetUsers(): parameterpermissionneeds to be supplied as hub localized permission name, instead of internal permission name (e.g. "Read User Basic" instead of "READ_USER_BASIC");UserManagementService.GetUsers(): it's not recommended to use "All Users" group forgroupparameter, since it would return empty result;UserManagementService.DeleteUser(): successor user login is now required to be passed additionally (Hub doesn't allow to delete users without a successor);
- API entities
Issue.Comment: fieldParentIdwas removed (as always empty)Issue.Comment: fieldJiraIdwas removed (as always empty)Issue.Comment: fieldShownForIssueAuthorwas removed (as always true)Issue.Comment: fieldReplieswas removed (as always empty)Management.Group: fieldIdwas replaced byRingIdproperty (due to usage of Hub API instead of YouTrack one)Management.Group: fieldUrlwas removedManagement.TimeTrackingSettings.TimeField: fieldUrlwas removedManagement.SystemWideTimeTrackingSettings: fieldHoursADaywas replaced byMinutesADay(identical values were returned for both HoursADay and MinutesADay)Projects.CustomField: fieldUrlwas removedTimeTracking.Author: fieldUrlwas removedTimeTracking.WorkType: fieldUrlwas removed
- API return values
Issues.Attachment:Urlfield is now relative instead of absolute (and includes context path, if YouTrack is running on a context, such as Cloudyoutrack/path prefix);Issues.Attachment: value ofGroupfor "All Users" group is not localized (translated) anymore;Issue.Change: changes are now not merged at all (previously several changes made within a shot period could be merged into a single one);Issue.Change:From.ValueandTo.Valuecontents might wildly differ from old API;Issues.Comment: value ofPermittedGroupfor "All Users" group is not localized (translated) anymore;Issue.Issue: member ofTagscollection for "Star" tag is not localized (translated) anymore;
Features
- Migrate from Deprecated REST API #105
- Low-level REST API client was generated from OpenAPI specification and exposed as
Generated.YouTrackClient
Enhancements
- See previous releases
Bugfixes
- See previous releases
Known issues
- (fixed in 2021.3.1)
IssuesService.GetIssue: argumentwikifyDescriptionis ignored and call to this method always returns raw description - some runtime exceptions might be encountered due heavy differences between old and new REST (and the fact that generated code is used), especially with regards to Changes entites; we tried to fix what we found
- generated api was checked (and manually patched/extended) only with regards to its uses by library api -- its direct use is discouraged
- (fixed in 2021.3.1)
IssuesService.GetIssues()is almost twice as slow as before for large issue batches ProjectsService.GetAccessibleProjects(verbose=true)is now significantly slower than in old library versions, and there seems not much we could do about that atm
Many other API's are not included yet - feel free to tackle one of the UpForGrabs issues and make YouTrackSharp better!