Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How set 'Request Participants' custom filed via PowerShell JiraPS?

IT Department
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2022

I was able to find that 'Request Participants' is field customfield_12703 but I don't know what kind of object should I pass to New-JiraIssue Fields parameter.

 

I've tried:

@{
    customfield_12703 = '<userName>'
}
customfield_12703 = @(@{
    value = @{emailAddress='<userEmail>'}
})
etc
Command even ended successfully but the 'Request Participants' field isn't populated...

2 answers

0 votes
German Rodriguez April 4, 2022

@IT Department 

I was able to get the following to work using the acountId of the customer accounts for the Request Participants field. I tried using the emailAddress and the displayName but those did not work.

$Parameters = @{
Project = "PROJECT_NAME"
IssueType = "ISSUE_TYPE"
Summary = "Test from JiraPS"
Description = "This is another test from JiraPS module in PowerShell"
Fields = @{
customfield_12703 = @(
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:93b32d64-a5c1-5829-77e5-0f98ec212451" }
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:2b6af13f-67c9-fc38-0b17-cf341573e082" }
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:4374ea62-350d-f265-1e6e-8e6b288d3fe3" }
)
}
}

New-JiraIssue @Parameters

 

0 votes
German Rodriguez April 4, 2022

@IT Department 

I was able to get the following to work using the acountId of the customer accounts for the Request Participants field. I tried using the emailAddress and the displayName but those did not work.

$Parameters = @{
Project = "PROJECT_NAME"
IssueType = "ISSUE_TYPE"
Summary = "Test from JiraPS"
Description = "This is another test from JiraPS module in PowerShell"
Fields = @{
customfield_12703 = @(
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:93b32d64-a5c1-5829-77e5-0f98ec212451" }
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:2b6af13f-67c9-fc38-0b17-cf341573e082" }
@{ "accountId" = "qm:9c011c16-b415-11ec-b909-0242ac120002:4374ea62-350d-f265-1e6e-8e6b288d3fe3" }
)
}
}

New-JiraIssue @Parameters

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events