Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JRA Jenkins Integration Broken Edited

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
Community showcase
Published in Marketplace Apps & Integrations

Jira issue check and more advanced commit verifications for Bitbucket DC

Pre-receive hooks that verify the Git commit message, the modified files, and implement similar code change controls used to be requirements of large enterprises working in regulated industries only....

19 views 0 0
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you