Is there an API/JIRA Function that I can call from Groovy to determine if a JIRA issue has associated commits?

Martin Ross January 5, 2014

I want to restrict transactions and edits based on commit content.

2 answers

1 accepted

1 vote
Answer accepted
Andrey Levchenko January 7, 2014

I'm member of plugin support team.

I don't have many groovy experience but looks like some plugin configuration needs to be changed to make required component available through ComponentAccessor. we are going to add these changes in the next plugin release (2.2). I'll let you know once next version will be available

Martin Ross January 13, 2014

Groovy is scripted Java basically so it can access all the method that a regular Java plugin can. That would be great if you could an API and a quick example of how to access.

Andrey Levchenko February 6, 2014

Current plugin version 2.2.1 should support something like:

{

com.atlassian.jira.issue.Issue issue = ...;
GitPluginIndexManager gitPluginIndexManager = (GitPluginIndexManager)ComponentAccessor.getOSGiComponentInstanceOfType(GitPluginIndexManager.class);
List<RevisionInfo> revisions =  gitPluginIndexManager.getLogEntriesByIssue gitPluginIndexManager(issue);

}

Let me know if it works for you

0 votes
Martin Ross January 13, 2014

Groovy is scripted Java basically so it can access all the method that a regular Java plugin can. That would be great if you could an API and a quick example of how to access.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events