-
Notifications
You must be signed in to change notification settings - Fork 24
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
JIRA returned status: Bad Request #20
Comments
Hi Mario
Haven't seen this issue before.
There is an error log generated that is placed alongside the application (in the application folder) called JiraToTfs.log.
Can you send this one and I will have a look.
Thanks - Ian.
…________________________________
From: Mario <[email protected]>
Sent: 25 April 2018 06:40
To: KilskyreMan/JiraToTfs
Cc: Subscribed
Subject: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
Hi,
You program looks like its exactly the program I need for my task.
Unfortunately I can't get it to work. I downloaded the newest binary and gave it the credentials.... If I give it the right projectKey it says "JIRA returned status: Bad Request". With the wrong projectKey I get a "this key was not found in the dictionary" (or something similiar, error message is in German) do you have any idea what could be the root of this error message.
I then tried to build it myself, but the build failed with errors for "TfsTeamProjectCollectionFactory"(missing package) and "workItemStore.DestroyWorkItems(toDelete);"(no method). I then tried installing this packages( https://www.nuget.org/packages/Microsoft.TeamFoundationServer.ExtendedClient/ ) but it didn't work either do you have any suggestions?
With best regards
Mario
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#20>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ3CMSMlh7fi_8lOZKBCEkTIdli1cks5tsBpBgaJpZM4Ti2uO>.
|
Thanks for your answer, the behaviour is pretty strange. Now I get a KeyNotFoundException, event though I'm using the same parameters as before. Edit: The projectKey is the thing that Jira puts before every entry? So if I have a entry called GET2-344 my project key would be "GET2"? Because if I do it that way it complains about key not found This is the log entry for the bad request:
This one for key not found:
|
Not sure where the german is coming from, I don't speak german myself 😊
It looks like you may have some custom priorities set up in Jira that is not mapped by the tool.
If memory serves me right you may need to go into 'Advanced Settings' and map TFS's P1, P2, P3 etc to the equivalent setting from Jira.
…________________________________
From: Mario <[email protected]>
Sent: 25 April 2018 08:10
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
Thanks for your answer, the behaviour is pretty strange. Now I get a KeyNotFoundException, event though I'm using the same parameters as before.
This is the log entry for the bad request
2018-04-25 07:57:07,068 [5] INFO TicketImporter.TicketImportAgent - Preparing to import 2018-04-25 07:57:07,255 [5] INFO TicketImporter.TicketImportAgent - Validating Jira tickets against TFS 2018-04-25 07:57:10,771 [5] ERROR JiraToTfs.Presenter.JiraToTfsPresenter - TechTalk.JiraRestClient.JiraClientException: JIRA returned status: Bad Request bei TechTalk.JiraRestClient.JiraClient1.AssertStatus(IRestResponse response, HttpStatusCode status)
bei TechTalk.JiraRestClient.JiraClient1.<EnumerateIssuesInternal>d__25.MoveNext() bei System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
bei TicketImporter.JiraProject.d__18.MoveNext()
bei TicketImporter.TicketImportAgent.StartImport()
bei JiraToTfs.Presenter.JiraToTfsPresenter.import_DoWork(Object sender, DoWorkEventArgs e)This one for key not found:2018-04-25 10:03:45,653 [1] ERROR JiraToTfs.Presenter.JiraToTfsPresenter - System.Collections.Generic.KeyNotFoundException: Der angegebene Schl�ssel war nicht im W�rterbuch angegeben.
bei System.Collections.Generic.Dictionary2.get_Item(TKey key) bei TicketImporter.TfsPriorityMap.get_Item(String lookUp) bei TicketImporter.TfsProject.toWorkItem(Ticket toImport) bei TicketImporter.TfsProject.CheckTicket(Ticket toAdd, IFailedTicket& failure) bei TicketImporter.TicketImportAgent.StartImport() bei JiraToTfs.Presenter.JiraToTfsPresenter.import_DoWork(Object sender, DoWorkEventArgs e)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ77CoJWEZ63cVgRV9UnDzxTwMtRkks5tsC9ugaJpZM4Ti2uO>.
|
Yeah its totally possible that my colleagues configureed custom priorities. Could you tell me where I see that. I'm a bit a Jira beginner :D |
The log indicates that you are able to connect to Jira and import started.
Log also seems to indicate a customised priority in Jira. these will need to be mapped in the tool before importing.
The tool contains a dictionary of TFS Priority values (P1, P2, P3 etc) which are mapped to Jira (common) priority equivalents.
When it can't find an entry in an internal dictionary it throws an exception (Key not found).
(See issue #9)
Have a look here on Jira priorities
https://confluence.atlassian.com/display/JIRA042/Defining+%2527Priority%2527+Field+Values?_ga=2.200917166.1601852027.1524642034-1292590175.1522742916
'BadRequest' issue may be down to unexpected / unmappable characters in return / submission requests to Jira, you might hit this issue again.
…________________________________
From: Mario <[email protected]>
Sent: 25 April 2018 08:53
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
Yeah its totally possible that my colleagues configureed custom priorities. Could you tell me where I see that. I'm a bit a Jira beginner :D
But the thing that bugs me is that it says key not found, is my understanding of the projectKeys right?
The German comes from my machine, the .Net framework uses error messages in the native language of the os.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ6qjljxsW5mdFAb57ScxOo66nzD8ks5tsDmcgaJpZM4Ti2uO>.
|
Thanks for your help. I think we are getting to the root. If I go to this URL: rest/api/2/priority I get the priorities. Apparently my colleagues set custom priorities.
|
It seems to work right now. I've modified the source to take my custom priorities, but its rather a hack than a fix, so I won't commit it right now. |
Another question :D |
There should be a text file (CSV file - if memory serves me right) that has Jira references & TFS ticket numbers in it.
It should be in the same folder as the application.
did the log indicate a count of imported tickets?
…________________________________
From: Mario <[email protected]>
Sent: 26 April 2018 12:30
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
Another question :D
Where can I find the tasks in TFS that were created by JiraToTFS?. I can't find it in any of the sprints?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ45POjhRU7r4FOrwPVVcOWQNk1gRks5tsb3bgaJpZM4Ti2uO>.
|
The report says: In the csv there are a lot of numbers :D but without a format at least it looks like that for me. |
Sorry Mario was thinking of a feature I had meant to add to the tool.
The CSV lists all the TFS numbers generated by the tool. It's useful if you wish to do a 'mass' delete if experimenting.
Best best is to create a TFS query for 'Tasks' and see where they went.
…________________________________
From: Mario <[email protected]>
Sent: 26 April 2018 12:59
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
The report says:
Tasks : 280
Product Backlog Items : 2
Bugs : 51
In the csv there are a lot of numbers :D but without a format at least it looks like that for me.
This is a part of it:
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ-2-Ttotbc6EA8to59_ZKuPYhAJsks5tscS8gaJpZM4Ti2uO>.
|
… ________________________________
From: Ian Montgomery <[email protected]>
Sent: 26 April 2018 13:34
To: KilskyreMan/JiraToTfs; KilskyreMan/JiraToTfs
Cc: Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
Sorry Mario was thinking of a feature I had meant to add to the tool.
The CSV lists all the TFS numbers generated by the tool. It's useful if you wish to do a 'mass' delete if experimenting.
Best best is to create a TFS query for 'Tasks' and see where they went.
________________________________
From: Mario <[email protected]>
Sent: 26 April 2018 12:59
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
The report says:
Tasks : 280
Product Backlog Items : 2
Bugs : 51
In the csv there are a lot of numbers :D but without a format at least it looks like that for me.
This is a part of it:
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ-2-Ttotbc6EA8to59_ZKuPYhAJsks5tscS8gaJpZM4Ti2uO>.
|
I finally resolved my issues :) |
Great stuff Mario. Glad to hear they are resolved.
Ian.
…________________________________
From: Mario <[email protected]>
Sent: 03 May 2018 11:49
To: KilskyreMan/JiraToTfs
Cc: Ian Montgomery; Comment
Subject: Re: [KilskyreMan/JiraToTfs] JIRA returned status: Bad Request (#20)
I finally resolved my issues :)
I will edit the wiki later and add a few of my findings, like how you mask spaces...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#20 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEvgZ4rFYHfyJE8lr9LWMQJNJ-ZG_DTCks5tuu7AgaJpZM4Ti2uO>.
|
Hi,
You program looks like its exactly the program I need for my task.
Unfortunately I can't get it to work. I downloaded the newest binary and gave it the credentials.... If I give it the right projectKey it says "JIRA returned status: Bad Request". With the wrong projectKey I get a "this key was not found in the dictionary" (or something similiar, error message is in German) do you have any idea what could be the root of this error message.
I then tried to build it myself, but the build failed with errors for "TfsTeamProjectCollectionFactory"(missing package) and "workItemStore.DestroyWorkItems(toDelete);"(no method). I then tried installing this packages( https://www.nuget.org/packages/Microsoft.TeamFoundationServer.ExtendedClient/ ) but it didn't work either do you have any suggestions?
With best regards
Mario
The text was updated successfully, but these errors were encountered: