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

Extract name from Issue Description

Gene Pengson
Contributor
September 30, 2024

Hi all

Just want to seek for advice. 

We have a ticket getting created and the information in the description looks like below

 

----Example

 

Hi, I am requesting a laptop of contractor "John Smith". Their information is below. The start date is "10/14/2024". Can we get his laptop shipped out Today please as he starts Monday. Thank you

1. Contractor name: John Smith
2. Hiring Manager Name:Windows test
3. Contract start date: 10/14/2024 - end date:01/01/2025
4. Email: john.smith@testing.com
5. Phone: 111-111-1111

----------------------------------------------------------------------------------------

 

I want to extract the name of the hiring manager. if possible

 

thanks in advance

Gene

2 answers

1 accepted

2 votes
Answer accepted
Max - Swift Checklist Dev
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.
September 30, 2024

Hi @Gene Pengson ,

 

you can try to use Smart Values:

{{issue.description. substringBetween("Hiring Manager Name:", "\n")}}

This will extract text between Hiring Manager Name: and new line

Screenshot 2024-09-30 at 18.38.15.png

Gene Pengson
Contributor
September 30, 2024

thank you very much that works like a charm!!!!!

0 votes
Arkadiusz Inglot
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.
September 30, 2024

Hi,

 

You can use plenty of functions to extract the string. The ideal would be to create your issue using custom fields and providing specified value inside - even using API if needed.

 

To make it simpler I'd first split it by \n and then extract the value starting with some string:

You can try:

{{issue.description.split('\n').match("Manager Name:(.*)")}}

You can try different methods using another functions: 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events