AtlassianPS / JiraPS

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

Possibility to add custom worklog attributes to New-JiraIssueWorklog #345

Closed RyoukoKonpaku closed 5 years ago

RyoukoKonpaku commented 5 years ago

Context

Our company uses a number of custom worklog attributes when submitting worklogs for the day. I wanted to automate worklog submission so I can submit in bulk in times when needed.

Currently Add-JiraIssueWorklog cmdlet doesn't have a parameter to add additional worklog attributes, so after submitting a bunch of worklogs from a custom script, I have to update each one with their respective custom worklog fields on tempo.

Description

Add support for submitting custom worklog attributes to the Add-JiraIssueWorklog cmdlet. Possibly an additional parameter -WorkLogAttributes $PSObject / $SomeIdentifierForTheWorkLog.

Additional Information

I don't have a clear idea yet as to what identifier is appropriate for getting the custom attributes, so maybe an additional Get-JiraWorkLogAttributes might be needed which returns the needed object. But maybe a better solution can is available.

alexsuslin commented 5 years ago

Are you sure, you're reffering to worklog attribute (like tempo plugin allows to do) or it is just jira issue custom field, that is laying on the screen during the resolve issue porcess, where you can add worklog (Time Tracking Field)

As far as I remember there is no worklog attributes in pure JIRA

RyoukoKonpaku commented 5 years ago

Now that you mentioned that, after re-checking. It seems that might be the case here.

I guess it's out of scope for the Module? It seems to be part of a plugin for tempo and not Jira itself. If it's out of scope I can close the issue, It seems they also have a REST API available so a custom script for updating might suffice for my requirements. Thanks for the heads up.

lipkau commented 5 years ago

The API for the worklog does not support any additional attributes. https://docs.atlassian.com/software/jira/docs/api/REST/8.0.2/#api/2/issue-addWorklog

Therefore, this request can't be fulfilled without running Set-JiraIssue after the change.