Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new-jiraissue - Deserialize issue #484

Open
SebastianMoinhinwech opened this issue Jul 6, 2023 · 0 comments
Open

new-jiraissue - Deserialize issue #484

SebastianMoinhinwech opened this issue Jul 6, 2023 · 0 comments

Comments

@SebastianMoinhinwech
Copy link

Description

When running new-Jiraissue against Jira Cloud, i get a error.

Steps To Reproduce

Error: VERBOSE: [Invoke-JiraMethod] Failed to get an answer from the server
DEBUG: [Invoke-JiraMethod] Executed WebRequest. Access $webResponse to see details
VERBOSE: [Test-ServerResponse] Checking response headers for authentication errors
DEBUG: [Test-ServerResponse] Investigating $InputObject.Headers['X-Seraph-LoginReason']
VERBOSE: [Invoke-JiraMethod] Status code: BadRequest
VERBOSE: [Resolve-ErrorWebResponse] Function started
DEBUG: [Resolve-ErrorWebResponse] ParameterSetName: __AllParameterSets
DEBUG: [Resolve-ErrorWebResponse] PSBoundParameters:
Key Value


Exception {"errorMessages":[],"errors":{"io.tempo.jira__account":"Can not deserialize instance of java.lang.Long out of START_OBJECT token\n at [Source: N/A; line: -1, column: -1]"}}
StatusCode BadRequest
Cmdlet System.Management.Automation.PSScriptCmdlet

VERBOSE: [Resolve-ErrorWebResponse] Retrieved body of HTTP response for more information about the error ($responseBody)
DEBUG: [Resolve-ErrorWebResponse] Got the following error as $responseBody
Invoke-JiraMethod: io.tempo.jira__account ---------------------- Can not deserialize instance of java.lang.Long out of START_OBJECT token…
VERBOSE: [Resolve-ErrorWebResponse] Function ended
VERBOSE: [Invoke-JiraMethod] Function ended
VERBOSE: [New-JiraIssue] Complete

My Powershellstatement:
$lorem = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,"
$field = @{
Firma = @{id = '10855'}
customfield_10400 = @{value = 'Some Text'}
customfield_14711 = @{id = '12752'}
customfield_14201 = "000"
Reporter = "Sebastian Moinhinwech"
}

$params = @{
Project = '15658'
IssueType = '12031'
Summary = "Guestaccount Report - $(Get-Date -Format g)"
Description = $lorem
}
$params.Fields = $field

New-JiraIssue @params -credential $jiracred

Expected behavior

A Jira Ticket should be created.

Screenshots

Your Environment

Powershell 7.3.5 with latest JiraPS

Get-Module JiraPS -ListAvailable | Select Name, Version

Get-Module JiraPS -ListAvailable | Select Name, Version

Name Version


JiraPS 2.14.6

$PSVersionTable
$PSVersionTable

Name Value


PSVersion 7.3.5
PSEdition Core
GitCommitId 7.3.5
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Possible Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant