denimgroup / threadfix

ThreadFix is a software vulnerability management platform. This GitHub site is far out of date. Please go to www.threadfix.it for up-to-date information.
340 stars 127 forks source link

Jira Integration Error #1763

Open Schandlich opened 8 years ago

Schandlich commented 8 years ago

I get the following error when attempting to create and then submit an issue in Jira.

Create Screen

ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component
ERROR [http-bio-8080-exec-5] DynamicFormFieldParser.getFields(219) | Unable to determine dynamic type for components:array of component

Submit

INFO [http-bio-8080-exec-10] DefectService.createDefect(185) | About to submit a defect to JIRA.
WARN [http-bio-8080-exec-10] JsonUtils.getStringProperty(66) | JSON string doesn't contain errors
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(363) | Payload: {\"fields\":{\"summary\":\"Testin\",\"customfield_10005\":[null],\"issuetype\":{\"id\":\"1\"},\"components\":[{\"id\":\"null\"}],\"project\":{\"id\":\"10707\"},\"description\":\"h4.General information\\nInformation Exposure at /app/main.lib.js\\n\\nVulnerability\\\\[0]: [Threadfix|http://threadfixserver:8337/threadfix/organizations/1/applications/1/vulnerabilities/3]\\nInformation Exposure\\nCWE entry: http://cwe.mitre.org/data/definitions/200.html\\nVulnerability attack surface location:\\nURL: http://cp-dev.services.one.cfg/app/main.lib.js\\n\\n\\n\",\"customfield_10101\":{\"id\":\"10104\"},\"labels\":[\"null\"]}}
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(182) | IOException encountered trying to post to URL with message: Server returned HTTP response code: 400 for URL: https://***.***********.com/rest/api/2/issue
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(191) | Error stream from HTTP connection was not null. Attempting to get response text.
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(193) | Error text in response was '{\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{\"components\":\"Could not parse id: null\"}}'
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(380) | Received RestIOException with message Unable to get response from server. Error text was: {\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{\"components\":\"Could not parse id: null\"}}. Attempting to correct errors and resubmit.
INFO [http-bio-8080-exec-10] JiraDefectTracker.getPayload(432) | Trying to send request one more time to Jira without fields: components
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(363) | Payload: {\"fields\":{\"summary\":\"Testin\",\"customfield_10005\":[null],\"issuetype\":{\"id\":\"1\"},\"project\":{\"id\":\"10707\"},\"description\":\"h4.General information\\nInformation Exposure at /app/main.lib.js\\n\\nVulnerability\\\\[0]: [Threadfix|http://threadfixserver:8337/threadfix/organizations/1/applications/1/vulnerabilities/3]\\nInformation Exposure\\nCWE entry: http://cwe.mitre.org/data/definitions/200.html\\nVulnerability attack surface location:\\nURL: http://cp-dev.services.one.cfg/app/main.lib.js\\n\\n\\n\",\"customfield_10101\":{\"id\":\"10104\"},\"labels\":[\"null\"]}}
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(182) | IOException encountered trying to post to URL with message: Server returned HTTP response code: 400 for URL: https://***.***********.com/rest/api/2/issue
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(191) | Error stream from HTTP connection was not null. Attempting to get response text.
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(193) | Error text in response was '{\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{}}'
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(380) | Received RestIOException with message Unable to get response from server. Error text was: {\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{}}. Attempting to correct errors and resubmit.
INFO [http-bio-8080-exec-10] JiraDefectTracker.getPayload(432) | Trying to send request one more time to Jira without fields: components
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(363) | Payload: {\"fields\":{\"summary\":\"Testin\",\"customfield_10005\":[null],\"issuetype\":{\"id\":\"1\"},\"project\":{\"id\":\"10707\"},\"description\":\"h4.General information\\nInformation Exposure at /app/main.lib.js\\n\\nVulnerability\\\\[0]: [Threadfix|http://threadfixserver:8337/threadfix/organizations/1/applications/1/vulnerabilities/3]\\nInformation Exposure\\nCWE entry: http://cwe.mitre.org/data/definitions/200.html\\nVulnerability attack surface location:\\nURL: http://cp-dev.services.one.cfg/app/main.lib.js\\n\\n\\n\",\"customfield_10101\":{\"id\":\"10104\"},\"labels\":[\"null\"]}}
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(182) | IOException encountered trying to post to URL with message: Server returned HTTP response code: 400 for URL: https://***.***********.com/rest/api/2/issue
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(191) | Error stream from HTTP connection was not null. Attempting to get response text.
WARN [http-bio-8080-exec-10] RestUtilsImpl.postUrl(193) | Error text in response was '{\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{}}'
INFO [http-bio-8080-exec-10] JiraDefectTracker.attemptSubmission(380) | Received RestIOException with message Unable to get response from server. Error text was: {\"errorMessages\":[\"Number value expected as the Sprint id.\"],\"errors\":{}}. Attempting to correct errors and resubmit.
ERROR [http-bio-8080-exec-10] RestExceptionControllerAdvice.resolveRestException(76) | Uncaught exception - logging at Aug 9, 2016 10:45:38 PM.

I am running 2.3-SNAPSHOT-c43dff2 of ThreadFix and v7.1.4 of Jira.

The Components dropdown as well as the Sprint field are blank.

kylepippin commented 8 years ago

Thank you for reporting this issue to us. We have released a fix to this issue in our 2.4 Enterprise build, but have not yet back-ported the fix to our open source or community editions.

We're looking at back-porting bug fixes to the 2.3.x branch, but we're in a bit of a git mess right now trying to make it easy to push that stuff back out to GitHub so it isn't an engineering nightmare. Hopefully that will get sorted out soon. The 2.4 branch will be Enterprise-only and that's where new features and the majority of the support resources are focused. So - the Community Edition is still available, but the new stuff will be Enterprise-only.

If you would like to give 2.4 a try and see what we've been adding in the last 9 months or so, please take a look at our website. You can download a full featured trial of 2.4 at www.threadfix.it/trial