Fetch information from table in description to custom fields

Olof Nysten
Contributor
February 18, 2021

I get a lot of issues generated from my customers datacenters. The issue description contains a table with information that I want to enter in custom fields with automation.

The table can look something like this

Alert Type:

Device Alarm

 

Severity:

Critical

 

Alert Level:

NewYork-Email-notification

 

Device:

ESU-RQ7 (101.159.160.183)

 

Is it possible to fetch through Regex?

2 answers

1 accepted

1 vote
Answer accepted
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2021

Hi @Olof Nysten welcome on the community. Can you describe the whole proces in more detail?

Issues are created automatically with description which contains table? How do you want to process it?

Olof Nysten
Contributor
February 19, 2021

Thank you.

The issues are created from incoming e-mails. These e-mails contains a table with all the information I need for custom fields. These field are then used in integrations with other systems.

As there are hundreds of issues created, it would be great if I can create an automation that fills the custom fields.

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2021

Hi @Olof Nysten , thank you for the information. Give me few days, I will try to play with it a little... I'm quite curious :)

Like Olof Nysten likes this
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2021

Hi @Olof Nysten I think I almost have it :).

I prepared issue with a table:

Selection_140.png

 

And I prepared an automation with following setup:

Selection_141.png

I logged my description to find out what is its format and it was:

|greeting|Hello| |name|Martin| |last name|Bayer|

 I hope it will help... :) 

Like Olof Nysten likes this
Olof Nysten
Contributor
February 22, 2021

Thank you very much! That was exactly it. I have experimented with expressions like that but never found the solution.

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2021

cool, you are welcome :)

Drew Lorenc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2023

Sorry duplicate response.

Monica
Contributor
July 18, 2024

@Martin Bayer _MoroSystems_ s_r_o__ I have a similar situation but I am just not able to grab the data, my table looks like this:

image.png

I need to grab the data that is highlighted so my text looks like this:

{{issue.description.match(".*|Requestor Employee Type|(\S+)|.*")}}

0 votes
Drew Lorenc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2023

@Olof Nysten  this worked great for horizontal matches, thank you!

I'm using the match function to return numeric values associated to a given month/quarter/year:

|Month|Total|

|Jan|1|Feb|2|Mar|3|

etc.

A couple questions:

#1

Using the regex noted for horizontal matching, I sum the number associated to each month in the table into a custom field for the respective Q1 total (e.g. Q1= matches for Jan + Feb + Mar, and so on). When I add Jan, Feb, Mar using regex match, the Q1 total shows up fine. :tada:

In the same automation string, I need to sum the now updated quarterly total fields into an Annual Total. I tried this two ways:

  1. Added component after And:Edit issue fields (for Quarterly) > And:Edit issue fields (for Annual Total).
  2. Added component afterAnd:Edit issue fields (for Quarterly) > Then:Add value to the audit log > And:Edit issue fields (for Annual Total).

In both cases the Annual total field won't update unless I re-edit the description field, so there seems to be an "edit" trigger lag.

#2

Depending on the layout of data in a table, is it possible to perform a vertical match instead of the horizontal solution you provided? Aka instead of using match to pull data to the right, is it possible to pull the data below?

 

A preferred table layout would be:

|Jan|Feb|Mar|Apr|May|Jun|

|1|2|3|4|5|6|

|Jul|Aug|Sep|Oct|Nov|Dec|

| | | | | | |

 

For a given month, the result is to pull the number entered below it into a custom field once the Description field is edited/updated; using the example the desired return would be "1" when matching for "Jan" or "5" when matching for "May"?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events