Closed fsackur closed 3 years ago
When explicilty specifying InputObject and rpoviding more than one object, Format-Jira cross-multiplies properties.
$Chrome = (Get-Process chrome | Select-Object -First 3) $Chrome | Format-Jira ||Id||Handles||CPU||SI||Name|| |1124|231|1.328125|1|chrome| |1600|312|1.421875|1|chrome| |2152|393|5.359375|1|chrome|
Format-Jira -InputObject $Chrome ||Id||Handles||CPU||SI||Name|| |1124 1600 2152|231 312 393|1.328125 1.421875 5.375|1 1 1|chrome chrome chrome| |1124 1600 2152|231 312 393|1.328125 1.421875 5.375|1 1 1|chrome chrome chrome| |1124 1600 2152|231 312 393|1.328125 1.421875 5.375|1 1 1|chrome chrome chrome|
https://github.com/AtlassianPS/JiraPS/blob/298dce5/JiraPS/Public/Format-Jira.ps1#L97
That needs to be:
$value = $i.$h
Alternatively, don't accept collections in InputObject. It breaks standard practice - all of the built-in cmdlets declare [object]$InputObject.
[object]$InputObject
Description
When explicilty specifying InputObject and rpoviding more than one object, Format-Jira cross-multiplies properties.
Steps To Reproduce
Works:
Doesn't work:
Expected behavior
Screenshots
Your Environment
Possible Solution
The bug is here:
https://github.com/AtlassianPS/JiraPS/blob/298dce5/JiraPS/Public/Format-Jira.ps1#L97
That needs to be:
Alternatively, don't accept collections in InputObject. It breaks standard practice - all of the built-in cmdlets declare
[object]$InputObject
.