[JIRA] (JENKINS-57695) Jira issue not created when jenkins build failed

87 views
Skip to first unread message

sachin.gahlawat19@gmail.com (JIRA)

unread,
May 27, 2019, 1:41:01 AM5/27/19
to jenkinsc...@googlegroups.com
Sachin Gahlawat created an issue
 
Jenkins / Bug JENKINS-57695
Jira issue not created when jenkins build failed
Issue Type: Bug Bug
Assignee: Unassigned
Components: jira-plugin
Created: 2019-05-27 05:40
Environment: Jenkins ver. 2.150.1, Centos OS
Labels: plugin jenkins exception
Priority: Blocker Blocker
Reporter: Sachin Gahlawat

I have setup the 3.6.0 version of Jira plugin for jenkins with my jenkins instance. I am having issue with "Create jira issue" upon job failure. 

Below is the error i am getting (from Console Output)

 

Build step 'Execute shell' marked build as failure
ERROR: Build step failed with exception
java.lang.NullPointerException
at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:202)
at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)
at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'JIRA: Create issue' marked build as failure
Finished: FAILURE

 

Need urgent help to fixing it.

 

Regards

Sachin Gahlawat

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
May 27, 2019, 11:38:02 PM5/27/19
to jenkinsc...@googlegroups.com
tanmoy roy commented on Bug JENKINS-57695
 
Re: Jira issue not created when jenkins build failed

I am also facing similar issue while creating Jira issue using Jenkins upon build failure

radek.antoniuk@quiddia.com (JIRA)

unread,
May 28, 2019, 5:31:02 AM5/28/19
to jenkinsc...@googlegroups.com
Radek Antoniuk updated an issue
 
Change By: Radek Antoniuk
Labels: exception jenkins plugin

radek.antoniuk@quiddia.com (JIRA)

unread,
May 28, 2019, 5:33:02 AM5/28/19
to jenkinsc...@googlegroups.com
Radek Antoniuk updated an issue
Change By: Radek Antoniuk
Environment:
Jenkins ver. 2.150.1, Centos OS

jira-plugin 3.0.6

radek.antoniuk@quiddia.com (JIRA)

unread,
May 28, 2019, 6:18:01 AM5/28/19
to jenkinsc...@googlegroups.com
Radek Antoniuk commented on Bug JENKINS-57695
 
Re: Jira issue not created when jenkins build failed
  1. Does the validate button in JIRA site definition in global configuration validates the connection correctly?
  2. Can you try version 3.0.7 of the plugin?

sachin.gahlawat19@gmail.com (JIRA)

unread,
May 28, 2019, 7:12:02 AM5/28/19
to jenkinsc...@googlegroups.com

Hi Radek,

Please find my comments below on your questions:-

  1. Does the validate button in JIRA site definition in global configuration validates the connection correctly? Answer:- Yes
  2. Can you try version 3.0.7 of the plugin? Answer:- For which plugin i will use version 3.0.7 for Jira plugin or for jenkins version. Please confirm.

radek.antoniuk@quiddia.com (JIRA)

unread,
May 28, 2019, 7:21:02 AM5/28/19
to jenkinsc...@googlegroups.com

3.0.7 for the jira-plugin - please update the jira-plugin to the current version from the Update Center

radek.antoniuk@quiddia.com (JIRA)

unread,
May 28, 2019, 7:22:01 AM5/28/19
to jenkinsc...@googlegroups.com
Radek Antoniuk updated an issue
Change By: Radek Antoniuk
I have setup the 3.6.0 version of Jira plugin for jenkins with my jenkins instance. I am having issue with "Create jira issue" upon job failure. 

Below is the error i am getting (from Console Output)

 
{noformat}
Build step 'Execute shell' marked build as failure
ERROR: Build step failed with exception
java.lang.NullPointerException
at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:202)
at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)
at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'JIRA: Create issue' marked build as failure
Finished: FAILURE {noformat}

 

  Need urgent help to fixing it.

 

Regards

Sachin Gahlawat

sachin.gahlawat19@gmail.com (JIRA)

unread,
May 28, 2019, 7:26:01 AM5/28/19
to jenkinsc...@googlegroups.com
Sachin Gahlawat commented on Bug JENKINS-57695
 
Re: Jira issue not created when jenkins build failed

Hi Radek,

 

I already used 3.0.7 version of Jira Plugin but it still didn't worked. can you please share the compatible version of jenkins and Jira plugin and other plugins which needs to be use to Create Jira issue when jenkins build fails. It will be helpful for me.

 

Sachin

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
May 28, 2019, 7:28:01 AM5/28/19
to jenkinsc...@googlegroups.com

I tried with JIRA-Plugin version 3.0.7.

But still facing the simailar issue in creation of Jira issue using Jenkins upon build failure.

 

Below is the ERROR logs from the console-

java.lang.NullPointerExceptionjava.lang.NullPointerException at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413) at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:202) at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357) at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1835) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
May 28, 2019, 7:41:03 AM5/28/19
to jenkinsc...@googlegroups.com
tanmoy roy edited a comment on Bug JENKINS-57695


 

N.B-My instance of Jenkins is hosted in Windows machine and the version is 2.150.3

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
May 29, 2019, 7:20:02 AM5/29/19
to jenkinsc...@googlegroups.com

Hey Team,

Any further updates on the issue. Need urgent help to fixing it.

sachin.gahlawat19@gmail.com (JIRA)

unread,
May 30, 2019, 5:16:02 AM5/30/19
to jenkinsc...@googlegroups.com

Hi Team,

Any tentative timeline to resolve this issue as it's raised till 2016 and still it's not resolved.

Can you please share the compatibility versions of Jira plugin and Jenkins server version.

 

Regards

Sachin

benoit.guerin@gmail.com (JIRA)

unread,
May 31, 2019, 8:48:01 AM5/31/19
to jenkinsc...@googlegroups.com

ristosaa@gmail.com (JIRA)

unread,
Jun 4, 2019, 6:15:02 AM6/4/19
to jenkinsc...@googlegroups.com

I have exact the same problem:

using latest Jenkins, Jira Plugin and Cloud Jira. This one is related a little bit to same thing but case is still different https://issues.jenkins-ci.org/browse/JENKINS-51629

it looks coming from:

 

public Issue createIssue(String projectKey, String description, String assignee, Iterable<String> components, String summary, @Nonnull Long issueTypeId, @Nullable Long priorityId) {| |final BasicIssue basicIssue = service.createIssue(projectKey, description, assignee, components, summary, issueTypeId, priorityId);| |return service.getIssue(basicIssue.getKey());| }

Line 413 https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/JiraSession.java

 

something is null but i have no idea what ?

 

 

ristosaa@gmail.com (JIRA)

unread,
Jun 4, 2019, 6:19:02 AM6/4/19
to jenkinsc...@googlegroups.com

Did you get any help to this ? we are facing the exactly same issue, using 2 different Jenkins instances wirh latests plugin. It must be related to REST call to JIRA cloud etc.

sathishc89@gmail.com (JIRA)

unread,
Jun 4, 2019, 6:26:02 AM6/4/19
to jenkinsc...@googlegroups.com

Even i too facing the same issue .. and i don't find solution anywhere in google .. waiting for someone to bring a fix

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
Jun 4, 2019, 7:08:01 AM6/4/19
to jenkinsc...@googlegroups.com

risto saari No we didnot get any help on the issue till now.

radek.antoniuk@quiddia.com (JIRA)

unread,
Jun 4, 2019, 7:17:02 AM6/4/19
to jenkinsc...@googlegroups.com

radek.antoniuk@quiddia.com (JIRA)

unread,
Jun 4, 2019, 7:37:03 AM6/4/19
to jenkinsc...@googlegroups.com
Radek Antoniuk updated an issue
I have setup the 3. 6. 0   .6 version of Jira plugin for jenkins with my jenkins instance. I am having issue with "Create jira issue" upon job failure. 


Below is the error i am getting (from Console Output)

 
{noformat}
Build step 'Execute shell' marked build as failure
ERROR: Build step failed with exception
java.lang.NullPointerException
at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:202)
at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)
at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)

at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'JIRA: Create issue' marked build as failure
Finished: FAILURE{noformat}
 

 Need urgent help to fixing it.

 

Regards

Sachin Gahlawat

radek.antoniuk@quiddia.com (JIRA)

unread,
Jun 4, 2019, 7:37:04 AM6/4/19
to jenkinsc...@googlegroups.com
Radek Antoniuk commented on Bug JENKINS-57695
 
Re: Jira issue not created when jenkins build failed

I can confirm that I am able to replicate this on my test environment. Comparing the changes in the last releases, I think this is caused by changes introduced since 3.0.5.
I'll try to take a look at this next week, if you have some time to investigate, please check v. 3.0.5 if it was working for you correctly.

sathishc89@gmail.com (JIRA)

unread,
Jun 4, 2019, 8:56:02 AM6/4/19
to jenkinsc...@googlegroups.com
sathish chinnasamy edited a comment on Bug JENKINS-57695
[~ristosaa] Finally i can create ticket.. problem i found from the jenkin log is ,

{color:#
FF0000 ff0000 } WARNING: JIRA REST createIssue error: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={customfield_10011=Epic Name is required., assigne{color}
{color:#
FF0000 ff0000 }e=User 'sathi...@gmail.com' does not exist.}, errorMessages=[]}]}{color}

 

{color:#172b4d}i kept _*Assignee*_ field _*empty*_ and change _*issue type*_ to _*Task*_  and it successfully created ticket in Jira{color}

{color:#172b4d}All we need to know is how to pass epic name inside issue type and for assignee its automatically picking my jenkin Username as default{color}

{color:#172b4d}No problem with the Jira Version{color}

sathishc89@gmail.com (JIRA)

unread,
Jun 4, 2019, 8:56:02 AM6/4/19
to jenkinsc...@googlegroups.com

Finally i can create ticket.. problem i found from the jenkin log is ,

 WARNING: JIRA REST createIssue error: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={customfield_10011=Epic Name is required., assigne


e=User 'sathi...@gmail.com' does not exist.}, errorMessages=[]}]}

 

i kept Assignee field empty and change issue type to Task  and it successfully created ticket in Jira

All we need to know is how to pass epic name inside issue type and for assignee its automatically picking my jenkin Username as default

No problem with the Jira Version

Add Comment Add Comment
 

sathishc89@gmail.com (JIRA)

unread,
Jun 4, 2019, 9:00:02 AM6/4/19
to jenkinsc...@googlegroups.com
sathish chinnasamy edited a comment on Bug JENKINS-57695
[~ristosaa] Finally i can create ticket.. problem i found from the jenkin log is ,

{color:#ff0000} WARNING: JIRA REST createIssue error: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={customfield_10011=Epic Name is required., assigne{color}
{color:#ff0000}e=User 'sathi...@gmail.com' does not exist.}, errorMessages=[]}]}{color}

 

{color:#172b4d}i kept _*Assignee*_ field _*empty*_ and change _*issue type*_ to _*Task*_  and it successfully created ticket in Jira{color}

{color:#172b4d}All we need to know is how to pass epic name inside issue type and for assignee its automatically picking my jenkin Username
or the user who created the job as default{color}

{color:#172b4d}No problem with the Jira Version{color}

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
Jun 6, 2019, 2:44:03 AM6/6/19
to jenkinsc...@googlegroups.com

sathish chinnasamy you tried with the latest version of the plugin, or v 3.0.5.

What if we need to create the issue as BUG, is that possible?? if not we need to manually update the raised ticket from Task to BUG. Please let me know if my understanding is correct.

 

And if the above case that i mentioned is valid than i think its not a permanent solution. Please suggest.

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
Jun 6, 2019, 3:52:02 AM6/6/19
to jenkinsc...@googlegroups.com

sathish chinnasamy i tried using the latest version and all the steps you mentioned above but still not able to create issue upon build failure. No logs in console output and Jenkins Logs

sachin.gahlawat19@gmail.com (JIRA)

unread,
Jun 11, 2019, 2:04:03 AM6/11/19
to jenkinsc...@googlegroups.com

Hi Team,

 

Any update on this issue. As per Radek he will work on this issue on this week. Please help us to resolve this issue as now it is a Blocker for may users.

rfelder@cyc.com (JIRA)

unread,
Jul 10, 2019, 2:22:02 PM7/10/19
to jenkinsc...@googlegroups.com

I am also experiencing this, but it is inconsistent.

Sometimes I do receive the NullPointerException

Sometimes a job fails and there is no indication in the logs that anything failed to occur, but a Jira ticket is not created.

This inconsistent behaviour occurs on projects that have been copied from one another, with no apparent difference in configuration.

I am presently tweaking issue type and severity values to see if I can get consistent behaviour but have not found a magic combination yet.

rfelder@cyc.com (JIRA)

unread,
Jul 10, 2019, 2:24:02 PM7/10/19
to jenkinsc...@googlegroups.com
Ryan Felder edited a comment on Bug JENKINS-57695
I am also experiencing this, but it is inconsistent.

Sometimes I do receive the NullPointerException

Sometimes a job fails and there is no indication in the logs that anything failed to occur, but a Jira ticket is not created.

Sometimes tickets are created as expected.

 

This inconsistent behaviour occurs on projects that have been copied from one another, with no apparent difference in configuration.

I am presently tweaking issue type and severity values to see if I can get consistent behaviour but have not found a magic combination yet.


 

I am using Jenkins 2.176.1, Jira Plugin 3.0.8, and I am trying to integrate with a hosted Jira Cloud site.

tanmoy.papi.roy90@gmail.com (JIRA)

unread,
Jul 11, 2019, 1:10:04 AM7/11/19
to jenkinsc...@googlegroups.com

rfelder@cyc.com (JIRA)

unread,
Aug 2, 2019, 11:13:01 AM8/2/19
to jenkinsc...@googlegroups.com

I just got this today after verifying my Jira settings test reports success.


ERROR: Build step failed with exception
java.lang.NullPointerException

at hudson.plugins.jira.JiraCreateIssueNotifier.getStatus(JiraCreateIssueNotifier.java:220)
at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultSuccess(JiraCreateIssueNotifier.java:388)
at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:161)


at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'JIRA: Create issue' marked build as failure

Now using Jenkins 2.176.2 and Jira Plugin 3.0.8

rfelder@cyc.com (JIRA)

unread,
Aug 2, 2019, 11:14:02 AM8/2/19
to jenkinsc...@googlegroups.com
Ryan Felder edited a comment on Bug JENKINS-57695
I just got this today after verifying my Jira settings test reports success.

 
{code:java}
ERROR: Build step failed with exception
java.lang.NullPointerException
at hudson.plugins.jira.JiraCreateIssueNotifier.getStatus(JiraCreateIssueNotifier.java:220)
at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultSuccess(JiraCreateIssueNotifier.java:388)
at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:161)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'JIRA: Create issue' marked build as failure {code}

Now using Jenkins 2.176.2 and Jira Plugin 3.0.8

neelimadevana5@gmail.com (JIRA)

unread,
Jan 3, 2020, 11:04:06 AM1/3/20
to jenkinsc...@googlegroups.com

 Am  experiencing  the same issue  with null pointer exception, its inconsistent in creating the issues in Jira .

Work Around:

 Curl command  works fine in create issue in Jira , make sure how your about your  mandatory Jira fields and add them to txt file .

 curl D -u username:password -X POST --data-binary "@/<path to TXT file>/abc.txt" -H "Content-Type: application/json" https://*<JIRA_BASEURL>*/rest/api/2/issue/

 

{

 "fields": {

       "project":

      

{           "key": "abc"        }

,

       "summary": "Sample Test ticket from Jenkins.",

       "description": "Creating of an issue using project keys and issue type names using the REST API",

       "issuetype":

{           "name": "Task"        }

,

      "customfield_10002":

      

{         "id": "1"         }

,

     "components":[\{"name":"Jenkins"}],

     "assignee" :

     

{        "name" :  "abc"      }

   }

}

{{}}

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

neelimadevana5@gmail.com (JIRA)

unread,
Jan 3, 2020, 11:05:06 AM1/3/20
to jenkinsc...@googlegroups.com
neelima devana edited a comment on Bug JENKINS-57695
 Am  experiencing  the same issue  with null pointer exception, its inconsistent in creating the issues in Jira .

+*Work Around:*+


 Curl command  works fine in create issue in Jira , make sure
how your about your   mandatory Jira fields and add them to txt file .

 {{curl -D- -u *username:password* -X POST --data-binary "@/*<path to TXT file>*/*abc.txt*" -H "Content-Type: application/json"
[ https://* |https://%2A/] <JIRA_BASEURL>*/rest/api/2/issue/}}

 

{

 "fields": {

       "project":

      
{


{
          "key": "abc"

       }

,

       "summary": "Sample Test ticket from Jenkins.",

       "description": "Creating of an issue using project keys and issue type names using the REST API",

       "issuetype":
{

{           "name": "Task"

       }

,

      "customfield_10002":

      
{

{         "id": "1"

        }

,

     "components":[\
\ {"name":"Jenkins"}],

     "assignee" :

     
{

{        "name" :  "abc"

     }


 

    }

}

{{}}

neelimadevana5@gmail.com (JIRA)

unread,
Jan 3, 2020, 11:05:09 AM1/3/20
to jenkinsc...@googlegroups.com
neelima devana edited a comment on Bug JENKINS-57695
 Am  experiencing  the same issue  with null pointer exception, its inconsistent in creating the issues in Jira .

+*Work Around:*+

 Curl command  works fine in create issue in Jira , make sure about your mandatory Jira fields and add them to txt file .

 {{curl -D-
  -u *username:password* -X POST --data-binary "@/*<path to TXT file>*/*abc.txt*" -H "Content-Type: application/json" [https://*|https://%2A/]<JIRA_BASEURL>*/rest/api/2/issue/}}


 

{

 "fields": {

       "project":

      

{           "key": "abc"        }

,

       "summary": "Sample Test ticket from Jenkins.",

       "description": "Creating of an issue using project keys and issue type names using the REST API",

       "issuetype":

{           "name": "Task"        }

,

      "customfield_10002":

      

{         "id": "1"         }

,

     "components":[
\\

{"name":"Jenkins"}

],

     "assignee" :

     

{        "name" :  "abc"      }

 

   }

}

{{}}

neelimadevana5@gmail.com (JIRA)

unread,
Jan 3, 2020, 11:05:09 AM1/3/20
to jenkinsc...@googlegroups.com
neelima devana edited a comment on Bug JENKINS-57695
 Am  experiencing  the same issue  with null pointer exception, its inconsistent in creating the issues in Jira .

+*Work Around:*+

 Curl command  works fine in create issue in Jira , make sure about your mandatory Jira fields and add them to txt file .

 {{curl - - D- -  -u *username:password* -X POST --data-binary "@/*<path to TXT file>*/*abc.txt*" -H "Content-Type: application/json" [https://*|https://%2A/]<JIRA_BASEURL>*/rest/api/2/issue/}}


 

{

 "fields": {

       "project":

      

{           "key": "abc"        }

,

       "summary": "Sample Test ticket from Jenkins.",

       "description": "Creating of an issue using project keys and issue type names using the REST API",

       "issuetype":

{           "name": "Task"        }

,

      "customfield_10002":

      

{         "id": "1"         }

,

     "components":[

{"name":"Jenkins"}

],

     "assignee" :

     

{        "name" :  "abc"      }

 

   }

}

{{}}

neelimadevana5@gmail.com (JIRA)

unread,
Jan 3, 2020, 11:21:05 AM1/3/20
to jenkinsc...@googlegroups.com
neelima devana edited a comment on Bug JENKINS-57695
 Am  experiencing  the same issue  with null pointer exception, its inconsistent in creating the issues in Jira .

+*Work Around:*+

 Curl command  works fine in create issue in Jira , make sure about your mandatory Jira fields and add them to txt file .

 {{curl --D-- -u *username:password* -X POST --data-binary "@/*<path to TXT file>*/*abc.txt*" -H "Content-Type: application/json" [https://*|https://%2A/]<JIRA_BASEURL>*/rest/api/2/issue/}}

 

{

 "fields": {

       "project":


   {          

{               "key": "abc"        }

           } ,

       "summary": "Sample Test ticket from Jenkins.",

       "description": "Creating of an issue using project keys and issue type names using the REST API",

       "issuetype":
{          

{               "name": "Task"        }

       } ,

      "customfield_10002":


  {      

{               "id": "1"         }

         } ,

     "components":[


\ {"name":"Jenkins"}

],

     "assignee" :


{        

{          "name" :  "abc"      }

 


     }

  }

{{ } }

rodrigc@FreeBSD.org (JIRA)

unread,
Feb 18, 2020, 4:44:03 PM2/18/20
to jenkinsc...@googlegroups.com
Craig Rodrigues resolved as Fixed
 

Fixed in plugin 3.0.12

Change By: Craig Rodrigues
Status: Open Resolved
Resolution: Fixed

amueller@scopeset.de (JIRA)

unread,
Apr 23, 2020, 11:16:02 AM4/23/20
to jenkinsc...@googlegroups.com
Armin Müller commented on Bug JENKINS-57695
 
Re: Jira issue not created when jenkins build failed

I'm afraid this (still) doesn't work for me. Jenkine 2.222.1, Plugin 3.0.15, self-hosted Jira 8.5.4:

 

{{Jira REST createIssue error: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors=

{assignee=expected Object containing a 'name' property}, errorMessages=[]}]}}}
{{RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={assignee=expected Object containing a 'name' property}

, errorMessages=[]}]}}}
{{ at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)}}
{{... }}
Caused: java.util.concurrent.ExecutionException
{{ at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)}}
{{ at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)}}
{{ at io.atlassian.util.concurrent.Promises$OfStage.get(Promises.java:357)}}
{{ at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:106)}}
{{ at hudson.plugins.jira.JiraRestService.createIssue(JiraRestService.java:306)}}
{{ at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:412)}}
{{ at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:204)}}
{{ at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)}}
{{ at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:159)}}
{{ at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)}}


{{ at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)}}
{{ at hudson.model.Build$BuildExecution.post2(Build.java:186)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)}}

{{ at hudson.model.Run.execute(Run.java:1881)}}
{{ at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)}}
{{ at hudson.model.ResourceController.execute(ResourceController.java:97)}}
{{ at hudson.model.Executor.run(Executor.java:428)}}

Any idea what could cause this?

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

amueller@scopeset.de (JIRA)

unread,
Apr 24, 2020, 4:37:03 AM4/24/20
to jenkinsc...@googlegroups.com
Armin Müller edited a comment on Bug JENKINS-57695
I'm afraid this (still) doesn't work for me. Jenkine Jenkins 2.222.1, Plugin 3.0.15, self-hosted Jira 8.5.4:
\ {statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors=

Reply all
Reply to author
Forward
0 new messages