Trouble with its-jira plugin on gerrit 2.14.1

252 views
Skip to first unread message

Gregory Maser

unread,
Sep 24, 2017, 9:14:31 PM9/24/17
to Repo and Gerrit Discussion
Hello All,

I am trying to get its-jira plugin running on my gerrit 2.14.1 instance and after trying for almost two days I cannot seem to get transitions working.

Some background:
gerrit version 2.14.1
its-jira version: 2.14 (plugin-its-jira-bazel-master-stable-2.14 -  pre built on gerrit-ci.gerritforge.com)

I am able to get comments working, so I know the plugin loaded fine, is enabled for the project I am working with, and the provided account has necessary permissions; for example I have this in etc/its/actions-its-jira.config and a comment is added to the jira issue when a -2 code-review is given to a change

[rule "someRuleForJiraOnly"]
  event-type = comment-added
  approval-Code-Review = -2
  action = add-comment Dear JIRA users, the change had a -2 Code-Review approval.

What I would like to do is transition the bug to "Working" when a change is uploaded.  For reference, I can manually set the bug to "Working" with the account provided in config without any additional information.

The output of http://myjiraulr/rest/api/2/issue/myjiraid/transitions definitely shows "Working" as a possible transition

{}

What I've tried:

in etc/issue-state-transition.config
[action "Working]
change=created

in etc/issue-state-transition.config (just to try something different)
[action "Working"]
code-review=+2

in etc/its/actions-its-jira.config (just to try something different)
[rule "setWorking"]
  event-type = comment-added
  approval-Code-Review = +2
  action = Working

I've set the logging level for JiraItsFacade and JiraClient classes to DEBUG, and I see the log messages when the plugin adds a comment to the issue (per my rule "someRuleForJiraOnly" above), but nothing about attempting the transition.  Not even a message about a failed attempt, or transition is invalid.  Just nothing, which leads to be believe something is configured incorrectly.  I've had to go into the documentation for previous versions of its-jira to find a mention of state transisions as it is not mentioned in the most current version of documentation.  Looking through the plugins history the commit where the state transition information was deleted states:

"All the documentation on the rules is now on its-base.
The its-jira section is completely obsolete and misleading"

But I was not able to find any mention of what I need it in the rest of the its documentation.  So I'm at a bit of a loss here, I'm missing something but I'm not sure what.

Thanks for the help


Luca Milanesio

unread,
Sep 25, 2017, 3:10:59 AM9/25/17
to Gregory Maser, Repo and Gerrit Discussion
Hi Gregory,
see my feedback below.

Those are both obsolete.


in etc/its/actions-its-jira.config (just to try something different)

This is the right file, assuming that the its-jira plugin is stored as /plugins/its-jira.jar

[rule "setWorking"]
  event-type = comment-added
  approval-Code-Review = +2
  action = Working

This rule will trigger the "Working" action on the Jira issue when a new commend is added and the approval label is Code-Review +2.
Have you tried to add a commend with Code-Review +2 and see if the Jira action is triggered?


I've set the logging level for JiraItsFacade and JiraClient classes to DEBUG, and I see the log messages when the plugin adds a comment to the issue (per my rule "someRuleForJiraOnly" above), but nothing about attempting the transition.  Not even a message about a failed attempt, or transition is invalid.  Just nothing,

This means that none of the rules matched.

which leads to be believe something is configured incorrectly.  I've had to go into the documentation for previous versions of its-jira to find a mention of state transisions as it is not mentioned in the most current version of documentation.  Looking through the plugins history the commit where the state transition information was deleted states:

"All the documentation on the rules is now on its-base.
The its-jira section is completely obsolete and misleading"

The relevant documentation is at [1]


But I was not able to find any mention of what I need it in the rest of the its documentation.  So I'm at a bit of a loss here, I'm missing something but I'm not sure what.

Thanks for the help

See the updated documentation link above.




--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages