Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JiraPS - Set-JiraIssue, unexpected results


Using JiraPS module, latest, and PowerShell 5.1. On Windows platform.

I am implementing automated creation and updating of Jira Versions as well as Jira Issues. This is regarding updating a previously created Jira Issue using Set-JiraIssue.


Update the DueDate field in an existing Jira Issue using Set-JiraIssue. Below is what I'm calling:

$parameters = @{
  Fields = @{
  DueDate = $NewDueDate

Set-JiraIssue $parameters -Issue $JiraKey


*$NewDueDate is formatted as a string with -Format "MMMM d, yyyy"

Negative Outcome:

Even though I am only attempting to set the DueDate I am getting the Jira's Summary field value changed (as reflected through the Jira web UI) to the text "System.Collections.Hashtable". And the DueDate field is not updated.


Please advise where I am going wrong.

I am using calls to Set-JiraIssue elsewhere (but without the parameters & Fields API syntax). I am successfully using the parameters & Fields API syntax in conjunction with calls to New-JiraIssue. I am currently stumped as to where I am going astray here and searching for clues that might resolve my problem.


2 answers

Really late to the party, but figured I'd update since you both helped me figure it out. Looks  like instead of $parameters, use @parameters. This worked for me:

$j = Get-JiraIssue -Key "RTSAFSYSEN-2521"
$parameters = @{Fields = @{DueDate = "2022-10-10"}}
Set-JiraIssue -key $j.key @parameters -WhatIf
What if: Performing the operation "Updating Issue" on target "RTSAFSYSEN-2521".
Set-JiraIssue -key $j.key @parameters
$j = Get-JiraIssue -Key "RTSAFSYSEN-2521"

What format is the time/date in if you do a get-jiraissue?

Sorry for the delayed response, just getting back to this issue.

The format returned for the jira issue DueDate is "yyyy-MM-dd", as in 2021-11-16.

Using the same date format doesn't seem to resolve my inability to update in this case.

See example below. Any insight(s) to resolve are appreciated.



$j = Get-JiraIssue -Key "RM-4001"



$parameters = @{Fields = @{DueDate = "2021-11-16"}}
$j | Set-JiraIssue -Fields $parameters -WhatIf
What if: Performing the operation "Updating Issue" on target "RM-4001".
$j | Set-JiraIssue -Fields $parameters
      Invoke-JiraMethod : An unknown error ocurred.
       At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.14.3\JiraPS.psm1:5509 char:21
       + Invoke-JiraMethod @parameter
       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       + CategoryInfo : InvalidResult: (:) [Invoke-JiraMethod], RuntimeException
       + FullyQualifiedErrorId : InvalidResponse.Status400,Invoke-JiraMethod

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events