AtlassianPS / JiraPS

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

Add JIRA changelog support #496

Open hkelley opened 6 months ago

hkelley commented 6 months ago

Context

It would be helpful to retrieve JIRA history via cmdlet

Description

Suggest Get-JIRAIssueChangelog as a wrapper for the https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-changelog-get

Additional Information

Currently working around this with

    $uri = "{0}/rest/api/latest/issue/{1}/changelog" -f (Get-JiraConfigServer),$issue.ID

    if(( $changes = Invoke-JiraMethod -URI $uri ) -and `
       ( $statuschange = $changes.values | Sort-Object created | ?{$_.items.fieldId -eq "status"}  |  Select-Object -First 1  ) ) {
.....