Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JRA Jenkins Integration Broken


Hello team, We upgraded JIRA to latest 8.13.4 from 7.13.3. We used to have Jenkins trigger build via JIRA transitions. After upgrade, it got broke. Looking at the article , I have updated my groovy line as required. But I still end up with error


2021-03-23 14:40:35,938 ERROR [workflow.AbstractScriptWorkflowFunction]: Workflow script has failed on issue EDPFILECP-207 for user 'username'. View here:
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.atlassian.jira.component.pico.ComponentManager()



My Groovy is


import com.atlassian.jira.component.pico.ComponentManager;

import com.atlassian.jira.issue.CustomFieldManager;

import com.atlassian.jira.issue.fields.CustomField;

import com.atlassian.jira.issue.IssueManager;

import com.atlassian.jira.issue.Issue;

import com.atlassian.jira.issue.MutableIssue;

//Imports for Jenkins outage check

import com.atlassian.jira.component.ComponentAccessor;

import com.atlassian.jira.issue.comments.CommentManager;

import com.atlassian.jira.user.ApplicationUser;




CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();


//Custom fields

CustomField customField_Artefact_Path = customFieldManager.getCustomFieldObjectByName("ID");

CustomField customField_Project_Name = customFieldManager.getCustomFieldObjectByName("Application Name");



Issue issue  = issue;


//To check the Jenkins outage


ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();

ComponentManager compManager = new ComponentManager();

CommentManager commentMgr = ComponentAccessor.getCommentManager();

commentMgr = (CommentManager) compManager.getComponentInstanceOfType(CommentManager.class);


def message ="";

def urlString="https://myjenkinsURL"


int status = (int) checkURL(urlString);


if ( status == 403 ) {

    message = "Jenkins is Up and Runing. JIRA ticket will be updated as the deployment get progressed.";

//commentMgr.create(issue, currentUser, message, false) message;


else if ( status == 200 ) {

message = "Jenkins is Up and Runing. JIRA ticket will be updated as the deployment get progressed.";

//commentMgr.create(issue, currentUser, message, false) message;

} else {

    message = "Jenkins is Down, Please try after some time.";

    commentMgr.create(issue, currentUser, message, false) message;


def checkURL(urlString){

  int status_code

  def tempmessage=""

  URL URLserver = new URL("$urlString");



    URLConnection connection = (HttpURLConnection)URLserver.openConnection();

    status_code = connection.getResponseCode(); "jenkins Status Code " +  status_code;




  catch (Exception exc){

      tempmessage=exc; "Error: " +  tempmessage;


  return status_code;



//End of Jenkins outage check


def id=issue.getKey();



//Values to variables


def Artefact_Path = issue.getCustomFieldValue(customField_Artefact_Path);

def Project_Name = issue.getCustomFieldValue(customField_Project_Name).toString().trim();



//handling space in the artefact path field


def temp_path = Artefact_Path.toString().split("\\r?\\n")

String oneline = String.join(",", temp_path);

String oneline_space = oneline.replaceAll(' ','%20')


//replacing the space with the _ in project name


def edp_tenacy_name = Project_Name.replaceAll("\\s","_")


def deploymentTime;

def tag_counter;


def today = new Date()


long secondsDiff

long elapsedSeconds=0


def newDate

if (deploymentTime != null)


newDate = new Date().parse("yyyy-MM-dd hh:mm:ss", deploymentTime.toString())

secondsDiff = (newDate.getTime() - today.getTime()) ;

elapsedSeconds = (long)(secondsDiff/1000);

} "STimeDiff - > " + elapsedSeconds


def edpjob_url ="https://myjenkinsurl”; "Project_Name " + Project_Name "Artefact_Path " + Artefact_Path "Artefact_Path in one line" + oneline "JIRA_KEY " + id "JIRA REPORTER ID" + jirareporterid "oneline(space replaced) : " + oneline_space "EDP Tenacy Name : " + edp_tenacy_name




log.debug "curl -1 -k --user <myuser>:<mytoken> -H Jenkins-Crumb:45a1ff80adf741c44906b355039f7c63 -X POST $edpjob_url?delay=$elapsedSeconds&FILE_LIST=$oneline_space&APPLICATION_NAME=$edp_tenacy_name&JIRA_REPORTER_ID=$jirareporterid&JIRA_KEY=$id -H Content-Type:application/x-www-form-urlencoded"


println "curl -1 -k --user <myuser>:<mytoken> -H Jenkins-Crumb:45a1ff80adf741c44906b355039f7c63 -X POST $edpjob_url?delay=$elapsedSeconds&FILE_LIST=$oneline_space&APPLICATION_NAME=$edp_tenacy_name&JIRA_REPORTER_ID=$jirareporterid&JIRA_KEY=$id".execute().text;




Any thing else needs changed? Please advice?



0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events