Capturing Client Ticket # in Jira Service Desk Subject line.

Daneige Gagnon November 19, 2020

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 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

0 votes
Mike Harrison _The Plugin People_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2020

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