You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invoke-JiraIssueTransition calls Get-JiraField once per entry in the -Fields parameter, causing unnecessary API traffic and long wait times to transition an issue.
This issue scales linearly (or quadratically in total) with:
Count of Jira custom fields (correlates to Get-JiraField response size)
Create a Jira instance with a large quantity of custom fields (500+)
Attach JiraPS to the instance
Create an issue, either via JiraPS or the Jira web UI
Transition the issue via Invoke-JiraIssueTransition with some quantity of fields to set in -Fields
Observe long call time
Expected behavior
Invoke-JiraIssueTransition finishes quickly (roughly on-par with web UI)
Screenshots
Your Environment
Get-Module JiraPS -ListAvailable | Select Name, Version
$PSVersionTable
JiraPS 2.14.7
Possible Solution
Based on work in #515, it was determined that simply replacing multiple calls to Get-JiraField with the -Name param with a single, unconstrained call (outside of iteration over -Fields) provided significant performance improvements.
While New-JiraIssue and Set-JiraIssue have the benefit of the CreateMeta and EditMeta endpoints on the Jira API (detailing what fields can and cannot be set), transitions lack a corresponding endpoint. A per-issue transitions API call (/rest/api/2/issue/{key}/transitions) may provide enough highly-contextualized information, but it's unclear if this is comprehensive.
The text was updated successfully, but these errors were encountered:
Description
Invoke-JiraIssueTransition
callsGet-JiraField
once per entry in the-Fields
parameter, causing unnecessary API traffic and long wait times to transition an issue.This issue scales linearly (or quadratically in total) with:
Get-JiraField
response size)-Fields
parameterRelated to #515.
Steps To Reproduce
-Fields
Expected behavior
Invoke-JiraIssueTransition
finishes quickly (roughly on-par with web UI)Screenshots
Your Environment
JiraPS 2.14.7
Possible Solution
Based on work in #515, it was determined that simply replacing multiple calls to
Get-JiraField
with the-Name
param with a single, unconstrained call (outside of iteration over-Fields
) provided significant performance improvements.While
New-JiraIssue
andSet-JiraIssue
have the benefit of the CreateMeta and EditMeta endpoints on the Jira API (detailing what fields can and cannot be set), transitions lack a corresponding endpoint. A per-issue transitions API call (/rest/api/2/issue/{key}/transitions
) may provide enough highly-contextualized information, but it's unclear if this is comprehensive.The text was updated successfully, but these errors were encountered: