[JIRA] (JENKINS-38710) jira-ext plugin is not adding comment as expected

50 views
Skip to first unread message

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 2:22:02 PM10/4/16
to jenkinsc...@googlegroups.com
Basma Shahadat created an issue
 
Jenkins / Bug JENKINS-38710
jira-ext plugin is not adding comment as expected
Issue Type: Bug Bug
Assignee: Dan Alvizu
Attachments: Changes.png, Configuration.png, ConsoleLog.png
Components: jira-ext-plugin
Created: 2016/Oct/04 6:21 PM
Priority: Blocker Blocker
Reporter: Basma Shahadat

I am trying to update JIRA from ChangeSet after each Build.

The console log is saying it is updating it ..

Updating JIRA tickets
ChangeLogSet class: class hudson.plugins.git.GitChangeSetList
Operation: Add a comment
Finish updating JIRA tickets

I dont see the changes in comment section. It is good to say in the log which JIRA is being updated.

Please find attached screenshot.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 3:59:01 PM10/4/16
to jenkinsc...@googlegroups.com
Basma Shahadat commented on Bug JENKINS-38710
 
Re: jira-ext plugin is not adding comment as expected

When I am trying to update a single issue, I am getting the following error:

Operation: Add a comment
Updating ticket: BUILDREL-3205
ERROR Updating jira notifications
net.rcarz.jiraclient.JiraException: Failed to retrieve issue BUILDREL-3205
at net.rcarz.jiraclient.Issue.realGet(Issue.java:700)
at net.rcarz.jiraclient.Issue.get(Issue.java:723)
at net.rcarz.jiraclient.JiraClient.getIssue(JiraClient.java:90)
at org.jenkinsci.plugins.jiraext.svc.impl.JiraClientSvcImpl.addCommentToTicket(JiraClientSvcImpl.java:78)

Is it because of connectivity issue?

alvizu@gmail.com (JIRA)

unread,
Oct 4, 2016, 4:13:01 PM10/4/16
to jenkinsc...@googlegroups.com
Dan Alvizu resolved as Won't Fix
 

Please look at your global configuration. You're almost certainly missing stuff there, such as what jenkins server to use, how to authenticate, and what ticket prefixes you care about.

If you're still seeing issues please paste your global configuration and the full stack trace. The stuff you've posted above is missing key information (the 'caused by' clause).

Change By: Dan Alvizu
Status: Open Resolved
Resolution: Won't Fix

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 5:51:01 PM10/4/16
to jenkinsc...@googlegroups.com
 
Re: jira-ext plugin is not adding comment as expected

Please find Global Configuration as attached.

Here is full stack trace ..

ERROR Updating jira notifications
net.rcarz.jiraclient.JiraException: Failed to retrieve issue BUILDREL-3205
at net.rcarz.jiraclient.Issue.realGet(Issue.java:700)
at net.rcarz.jiraclient.Issue.get(Issue.java:723)
at net.rcarz.jiraclient.JiraClient.getIssue(JiraClient.java:90)
at org.jenkinsci.plugins.jiraext.svc.impl.JiraClientSvcImpl.addCommentToTicket(JiraClientSvcImpl.java:78)

at org.jenkinsci.plugins.jiraext.view.AddComment.perform(AddComment.java:78)
at org.jenkinsci.plugins.jiraext.view.JiraExtBuildStep.perform(JiraExtBuildStep.java:63)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.IllegalStateException: Target host is null
at org.apache.http.util.Asserts.notNull(Asserts.java:52)
at org.apache.http.impl.conn.DefaultHttpRoutePlanner.determineRoute(DefaultHttpRoutePlanner.java:98)
at org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:762)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:381)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at net.rcarz.jiraclient.RestClient.request(RestClient.java:126)
at net.rcarz.jiraclient.RestClient.get(RestClient.java:243)
at net.rcarz.jiraclient.Issue.realGet(Issue.java:698)
... 14 more

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 5:51:01 PM10/4/16
to jenkinsc...@googlegroups.com
Basma Shahadat updated an issue
 
Change By: Basma Shahadat
Attachment: GlobalConfiguration.png

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 5:55:01 PM10/4/16
to jenkinsc...@googlegroups.com
Basma Shahadat reopened an issue
Change By: Basma Shahadat
Resolution: Won't Fix
Status: Resolved Reopened

alvizu@gmail.com (JIRA)

unread,
Oct 4, 2016, 5:57:01 PM10/4/16
to jenkinsc...@googlegroups.com
Dan Alvizu resolved as Won't Fix
Change By: Dan Alvizu
Status: Reopened Resolved
Resolution: Won't Fix

alvizu@gmail.com (JIRA)

unread,
Oct 4, 2016, 5:57:01 PM10/4/16
to jenkinsc...@googlegroups.com
Dan Alvizu commented on Bug JENKINS-38710
 
Re: jira-ext plugin is not adding comment as expected

That is not the jira-ext plugin config. That is the JIRA plugin config Please look for jira-ext config.

> Target host is null

You have not set your host in global config.

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 6:13:02 PM10/4/16
to jenkinsc...@googlegroups.com

Thanks. Got it. It is working for single issue update.

If i choose the option mentioned somewhere in commit message, it does not update.

Here is my changes:

Changes
BUILDREL-3205: Testing JIRA ext plugins (detail)

The Console log says:
Updating JIRA tickets
ChangeLogSet class: class hudson.plugins.git.GitChangeSetList
Operation: Add a comment
Finish updating JIRA tickets

In JIRA ticket, i dont see any update. It works if i mention the same JIRA ticket# explicitly in single issue update.

alvizu@gmail.com (JIRA)

unread,
Oct 4, 2016, 6:15:02 PM10/4/16
to jenkinsc...@googlegroups.com

You need to tell jira-ext that your tickets begin with `BUILDREL-` – you will need to set this in your JIRA ticket pattern in global configuration. Please read the configuration and the help there. It defaults to `FOO-,BAR`

https://github.com/jenkinsci/jira-ext-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/jiraext/Config/global.jelly#L20

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 6:55:01 PM10/4/16
to jenkinsc...@googlegroups.com

Thanks. It is working now. We are testing field update now.

bshahadat@gmail.com (JIRA)

unread,
Oct 4, 2016, 7:16:01 PM10/4/16
to jenkinsc...@googlegroups.com

It is working smoothly. Can I pass any value generated by build in that field update? How?

alvizu@gmail.com (JIRA)

unread,
Oct 4, 2016, 7:25:03 PM10/4/16
to jenkinsc...@googlegroups.com

This is an open source project, please be respectful of that. You are asking unrelated questions in a bug report about basic functionality.

Please read this:

http://www.catb.org/~esr/faqs/smart-questions.html

> When you ask your question, display the fact that you have done these things first; this will help establish that you're not being a lazy sponge and wasting people's time.

Reply all
Reply to author
Forward
0 new messages