AtlassianPS / JiraPS

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

Unable to set customfield from JiraPS using Powershell #422

Closed tonyitde closed 3 years ago

tonyitde commented 3 years ago

Dear community,

I am new here and it is my first time trying to use JiraPS for automation. I am trying to update a service request changing a value we have Request type used by customfield_10000

image

I want to update the value from this field using Set-JiraIssue but I am not sure how can I do that. I checked the metadata

image

image

I want to update a ticket from one Request type to another, for example, using the last image from the ID 23 to other ID from the value list allowed.

then I tried multiple combinations using Fields

$Fields = @{} $Fields.Add('customfield_10000' , NO IDEA)

can you please help me using JiraPS? Reading a ticket from Powershell I discover the following for customfield_10000

image

Thanks a lot for your kindly suggestions Tony

jdelforno commented 3 years ago

@tonyitde Post your code?

lipkau commented 3 years ago

hard to help without code. But considering the schema of the field, I would start with

Set-JiraIssue $issue -Fields @{ customfield_10000 = @{ id = 22 } }
tonyitde commented 3 years ago

Dear Team,

sorry I was really off of IT topic last weeks.

The solution came to me finally: using F12 I send in the web portal different request types. I analyzed what was sent and I discover the field customfield_10000 sent a long string, changing for each different type. I created than using JiraPS a ticket adding this value and works!

This is a plugin then if more of you use it, you have the change to create new ticket with populated value.

Regards Tony