Closed Rufus125 closed 4 years ago
Hi @Rufus125
Weird behavior.
I tried ([Int]"$([Object][Int]1)").gettype()
and it seems to work as the script expects it.
The script should be robust enough to not fail if you remove that line. So if you want, please create the PR.
With a next version of the module, I intend to have a object type [Transition]. So that behavior would be gone latest by then.
Description
I wanted to pass an integer to the Invoke-Transition call as parameter and wondered why it does not work via a variable.
Error message:
Possible Solution
My guess is, that this has something to do with how an integer is treated (not as an Object). https://github.com/AtlassianPS/JiraPS/blob/master/JiraPS/Public/Invoke-JiraIssueTransition.ps1#L32 In this line the transition parameter is cast/set as an Object. This might be the problem. When I removed this line, the code above worked, but I did not create a pull request, since I am not sure if this would break something else.
Have a nice day :)