AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
321 stars 131 forks source link

Format-Jira yields wrong representation of SourceAddress property (from Test-Netconnection) #456

Open JensGJ opened 2 years ago

JensGJ commented 2 years ago

Description

Format-Jira should behave like Format-Table in regards to the values for each column - just adding the required markdown for a Jira table. This is not happening for the Test-Netconnection property SourceAddress. Instead of showing a simple ip address Format-Jira returns a MSFT_NetIPAddress object notation - with no trace of the actual ip address.

Steps To Reproduce

Compare the following two representations of a Test-Netconnection request:

Test-NetConnection atlassian.com -CommonTCPPort HTTP | Format-Table -Property Computername, SourceAddress, RemoteAddress, RemotePort
Test-NetConnection atlassian.com -CommonTCPPort HTTP | Format-Jira -Property Computername, SourceAddress, RemoteAddress, RemotePort

The first one (with Format-Table) yields a SourceAddress in a standard dot-decimal notation (i.e. 172.3.2.1) Format-JIRA instead yields the value MSFT_NetIPAddress (Name = ";A?8?@8;:@8;A:55?55;55;", CreationClassName = "", SystemCreationClassName = "", SystemName = "")

Expected behavior

I would expect that the SourceAddress value yielded by Format-Jira would be the exact same as the one yielded by Format-Table

Screenshots

2022-06-09 09_39_09-Administrator_ Windows PowerShell

Your Environment

Running Windows 10, JiraPS 2.14.6

Get-Module jiraps -ListAvailable | select name, version

Name   Version
----   -------
JiraPS 2.14.6

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1682
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1682
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1