How to copy part of one custom field to another?

Purujeet Parida April 5, 2020

I want to copy a part of a string stored in one custom field to another custom field on the same issue.

Can I do it via automation since I can't find any custom field type which will let me define the function that does this?

1 answer

0 votes
Ajay _view26_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2020

Hi @Purujeet Parida 

Should be possible with smart values in automation for jira. Can you let me know the custom filed types involved here ?

Purujeet Parida April 7, 2020

Hi @Ajay _view26_ Both are multi-line text fields. One of them is auto-populated by a link with Zohodesk. I need to copy only the numerical code (of format #****, where * is one character) which is at the beginning of every string and discard the rest of the string.

Ajay _view26_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2020

You could try using regex in your expression something similar to 

{{issue.description.match("([a-z]+@[a-z]+\.[a-z]{2,4})")}}

Note that you would need to edit the regex to suite your requirement

Like Purujeet Parida likes this
Purujeet Parida April 17, 2020

Thanks. Let me try that. 

Suggest an answer

Log in or Sign up to answer