Closed smorrisonk closed 3 months ago
The exception is raised inside the getter for EpicParent
, on JiraItem.cs
:
This in turn calls the ExValue
extension method on a JObject
, when ExValue
is only defined for the type JToken
:
Do you have any previous experience of getting the JiraExporter to work on mac? We do not officially support MacOS yet, and I would recommend running the CLI in a Windows VM instead.
Windows user here running into the same exception:
[System.InvalidCastException] System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken.
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Migration.Common.JsonExtensions.ExValue[T](JToken token, String path)
at JiraExport.JiraItem.get_EpicParent()
at JiraExport.JiraProvider.<EnumerateIssues>d__30.MoveNext()
at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption token, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical):
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Migration.Common.JsonExtensions.ExValue[T](JToken token, String path)
at JiraExport.JiraItem.get_EpicParent()
at JiraExport.JiraProvider.<EnumerateIssues>d__30.MoveNext()
at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption token, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical)
Looks like it is related to this: Upcoming changes: 'epic-link' replaced with 'parent'
Can see a demo of the new complex object parent
here: .NET fiddle
That said, there is usually another custom field in the payload that represents the old epic-link
field that can be used for instead of the parent
field.
@jbparker @smorrisonk Ok, my bad! :)
Do you have any more details on how to create/modify a Jira issue in order to reproduce this error message? Does it always happen when you add an epic link to an issue?
Any issue histories if available would be helpful!
This issue is stale because it has been open for 25 days with no activity.
This issue was closed because it has been inactive for 5 days since being marked as stale.
Describe the problem
I getting an error when trying to export issues from Jira;
Unexpected migration error. [System.InvalidCastException] System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken.
From my research it could have to do with my local json-file failing to parse(?) but I need help on how to solve the issue.
To Reproduce
The command I'm running (on Mackbook, using Wine to run the file) is "wine jira-export.exe -u myUerEmail -p myJiraToken --url https://jiraWorkspace.atlassian.net --config config-basic.json --force"
Tool version jira-azuredevops-migrator-3.0.426
Attachments
Please attach the following files: config-basic.json error-message.txt