coreos / issue-sync

A tool for synchronizing issue tracking between GitHub and JIRA
Apache License 2.0
124 stars 34 forks source link

Issue with Jira - "issue type is required" #31

Open MatthiasWiesner opened 6 years ago

MatthiasWiesner commented 6 years ago

Hello, I just installed and run issue-sync and got this error message:

root@jira:/usr/lib/go-1.7/src/github.com/coreos/issue-sync# bin/issue-sync --config ./config.json -u admin -p vohx9Shoofen6cei
INFO[0000] config file loaded                            file="./config.json"
INFO[0000] log level set                                 app=issue-sync log-level=debug
DEBU[0000] Checking config variables...                  app=issue-sync
DEBU[0000] Using HTTP Basic Authentication               app=issue-sync
DEBU[0000] All config variables are valid!               app=issue-sync
DEBU[0000] JIRA clients initialized                      app=issue-sync
DEBU[0000] Collecting field IDs.                         app=issue-sync
DEBU[0000] All fields have been checked.                 app=issue-sync
DEBU[0000] Successfully connected to GitHub.             app=issue-sync
DEBU[0000] Collecting issues                             app=issue-sync
DEBU[0004] Collected all GitHub issues                   app=issue-sync
DEBU[0004] Collected all JIRA issues                     app=issue-sync
DEBU[0004] Creating JIRA issue based on GitHub issue #36  app=issue-sync
ERRO[0004] Error performing operation; retrying in 507ms: Request failed. Please analyze the request body for more details. Status code: 400  app=issue-sync
...
ERRO[0076] Error creating JIRA issue: Request failed. Please analyze the request body for more details. Status code: 400  app=issue-sync
DEBU[0076] Error body: {"errorMessages":[],"errors":{"issuetype":"issue type is required"}}  app=issue-sync
ERRO[0076] Error creating issue for #36. Error: {"errorMessages":[],"errors":{"issuetype":"issue type is required"}}  app=issue-sync
DEBU[0076] Creating JIRA issue based on GitHub issue #37  app=issue-sync
ERRO[0076] Error performing operation; retrying in 389ms: Request failed. Please analyze the request body for more details. Status code: 400  app=issue-sync

I created a new Jira project and configure Jira with:

squat commented 6 years ago

Hmm the underlying error here is

{"errorMessages":[],"errors":{"issuetype":"issue type is required"}}

Thanks for reporting this. Will investigate.

MatthiasWiesner commented 6 years ago

Thank you for your fast response! And if it helps, these are the projects metadata: curl ... https://ticketsystem.schul-cloud.org/rest/api/2/issue/createmeta

{  
   "expand":"projects",
   "projects":[  
      {  
         "self":"https://ticketsystem.schul-cloud.org/rest/api/2/project/10100",
         "id":"10100",
         "key":"MT",
         "name":"MW TEST",
         "avatarUrls":{  
            "48x48":"https://ticketsystem.schul-cloud.org/secure/projectavatar?avatarId=10324",
            "24x24":"https://ticketsystem.schul-cloud.org/secure/projectavatar?size=small&avatarId=10324",
            "16x16":"https://ticketsystem.schul-cloud.org/secure/projectavatar?size=xsmall&avatarId=10324",
            "32x32":"https://ticketsystem.schul-cloud.org/secure/projectavatar?size=medium&avatarId=10324"
         },
         "issuetypes":[  
            {  
               "self":"https://ticketsystem.schul-cloud.org/rest/api/2/issuetype/10202",
               "id":"10202",
               "description":"",
               "iconUrl":"https://ticketsystem.schul-cloud.org/secure/viewavatar?size=xsmall&avatarId=10300&avatarType=issuetype",
               "name":"GitHub Issue",
               "subtask":false
            }
         ]
      },

So there is a default issue type. And I have not seen an option to explicitly set the issue type.