Closed asherber closed 1 year ago
Just ran into this and I would appreciate this being supported out of the box. And thanks for the workaround idea!
@nvarscar Also add Get-JiraIssueWorklog
to the FunctionsToExport
array in JiraPS.psd1
if you're making mods locally.
I ended up just reusing Invoke-JiraMethod
from the source, as I didn't need to interface with the worklog object:
$parameter = @{
URI = "{0}/worklog" -f $issue.RestURL
Method = "GET"
GetParameter = @{
maxResults = 1000
}
Paging = $true
Credential = $Credential
}
$workLogs = Invoke-JiraMethod @parameter
Context
I'd like to be able to get a full list of issue worklogs.
Get-JiraIssue
only returns the first 20.Description
I'd like a function
Get-JiraIssueWorklog
, modeled afterGet-JiraIssueComment
that returns a full list of all worklog items for an issue.Additional Information
Testing locally, I was able to accomplish this by copying the body of
Get-JiraIssueComment
to a new functionGet-JiraIssueWorklog
, changing only the URI (comment
->worklog
) and the OutputType (JiraComment
->JiraWorklogItem
). I also had to addJiraWorklogItem
to theValidateSet
forOutputType
onInvoke-JiraMethod
.I could submit a PR for this, but I'm not sure I'm able to write the appropriate unit tests.