How to read each line from lastcomment in Groovy script

Omprakash Thamsetty
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.
February 5, 2019

Hi,

Jira 7.7.2

I am trying to read last comment and then read the text each line. 

 

Example last comment:

Priority:High

Severity:Minor

 I needs to split each line and get values 

 

priority value separate and severity value separate. I am using as below

def priority = ( lastcom as String)?.replaceAll(/.*\:/,'')

but giving me output as High Minor. I need in 2 different values. How I can save each split ?

Thanks,

Om

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events