JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
134 stars 105 forks source link

StateMachineIssueCustomField deserialization failing #124

Closed Muhahe closed 1 year ago

Muhahe commented 1 year ago

Expected behavior

Ability to fetch issue from project that uses state machine.

Actual behavior

InvalidCastException: Unable to cast object of type 'YoutrackSharp.Generated.StateBundleElement' of type 'YouTrackSharp.Generated.EnumBundleElement'

Steps to reproduce the behavior

  1. Create project with State field
  2. Attach simple state machine to that field
  3. Create simple issue in the project
  4. Establish youtrack sharp connection to that project
  5. get issue service
  6. try get issue by GetIssue() method on issue service

youtrack version: 2022.3.65372 youtrackSharp version: 2022.3.0

image image

rekolobov commented 1 year ago

@Muhahe Hello, thank you for the report and sorry for the late reply. Indeed, that's my oversight, even more so given that this has already happened once in #112 I've committed the fix in ae84138575a0bcd08414805a87bf626367a87036 along with the tests for all field types to not miss similar stuff again.

Expected to release in the scope of 2022.3.1 tomorrow