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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Capturing Client Ticket # in Jira Service Desk Subject line.

Looking for help. 

 

Does anyone know if there is a script that can capture the client ticket number in the client's response email through JEMH and automatically include it in JService Desk Subject line.   

 

Having issues with integration between SD plus and Jira SD.  Any other suggestions are welcomed.   

 

thank you

Daneige

 

2 answers

1 accepted

0 votes
Answer accepted
Daniel Ebers Community Leader Nov 23, 2020

Hi Daneige,

I used to implement this in the past with a Ticket Number provided by a foreign system sending in to Jira and processing through JEMH.

With Script Field Processor I took the Ticket number (OTRS in that case but can be adjusted) from subject and put it to a custom field called "OTRSTicketNo". With Script Runner (Script Listener) the rest of the logic is done to put the data back to subject of Jira issue.

In case it helps here is the JEMH part:

var str = subject;
var res = str.match(/\[Ticket#[0-9]*]/g);
print('Data is '+res);

if (2>1)
{

    resultMap.put("OTRSTicketNo", res[0]);

}

Cheers,
Daniel

Hello both,

Just adding some additional information here. If you are dealing with information sent from external/foreign systems, the Regexp Field Processor can often be useful.

In this case however, it sounds like you want to append extra information to the issue summary. This is indeed better suited to the Script Field Processor.

This can be done completely inside JEMH, with some changes to the script provided by Daniel:

var str = body; //change body to subject if thats where data is
var res = str.match(/\[Ticket#[0-9]*]/g);
print('Data is '+res);

if (res && res.length>0)
{
resultMap.put("summary", subject +" "+ res[0]);
}

Regards,

Mike

Suggest an answer

Log in or Sign up to answer
TAGS

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