Skip to content

YouTrackSharp 2021.3.0

Compare
Choose a tag to compare
@rekolobov rekolobov released this 05 Jul 15:46
· 0 commits to 203 since this release

Breaking changes

  • Classes and methods
    • BearerTokenConnection requires 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;
    • GetAthenticatedHttpClient was replaced by two new methods:
      • GetAuthenticatedApiClient that provides new api methods and should be used most of the time
      • GetAuthenticatedRawClient which could be used for any HTTP calls you wish to implement manually
    • YouTrackErrorException was replaced by Generated.YouTrackErrorException which has more properties and contains different error messages, responses and statuses
    • IssuesService.AttachFileToIssue(): it's not recommended to use "All Users" group for group parameter, since it would fail with exception;
    • IssuesService.GetIssuesInProject(): millisecond resolution of updatedAfter parameter is now ignored (value will be rounded down internally to the nearest second);
    • IssuesService.UpdateCommentForIssue now throws Generated.YouTrackErrorException if issue or attachment were not found
    • UserManagementService.GetUsers(): parameter permission needs 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 for group parameter, 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: field ParentId was removed (as always empty)
    • Issue.Comment: field JiraId was removed (as always empty)
    • Issue.Comment: field ShownForIssueAuthor was removed (as always true)
    • Issue.Comment: field Replies was removed (as always empty)
    • Management.Group: field Id was replaced by RingId property (due to usage of Hub API instead of YouTrack one)
    • Management.Group: field Url was removed
    • Management.TimeTrackingSettings.TimeField: field Url was removed
    • Management.SystemWideTimeTrackingSettings: field HoursADay was replaced by MinutesADay (identical values were returned for both HoursADay and MinutesADay)
    • Projects.CustomField: field Url was removed
    • TimeTracking.Author: field Url was removed
    • TimeTracking.WorkType: field Url was removed
  • API return values
    • Issues.Attachment: Url field is now relative instead of absolute (and includes context path, if YouTrack is running on a context, such as Cloud youtrack/ path prefix);
    • Issues.Attachment: value of Group for "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.Value and To.Value contents might wildly differ from old API;
    • Issues.Comment: value of PermittedGroup for "All Users" group is not localized (translated) anymore;
    • Issue.Issue: member of Tags collection 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: argument wikifyDescription is 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!