Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table Transformer not able to use Jira Label field

gautamdey
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 6, 2023

Im trying put a Jira data using the Jira using Jira filter and then use the table Filter. 

I used this query 

SELECT T1.'Summary' as 'Deliverables',
T1.'Status' as 'Status',
CASE
WHEN MATCH_REGEXP(T1.'Labels', 'mco')
THEN "MCO"
WHEN MATCH_REGEXP(T1.'Labels', 'cloud')
THEN "CLOUD"
WHEN MATCH_REGEXP(T1.'Labels', 'DE')
THEN "DE"
WHEN MATCH_REGEXP(T1.'Labels', 'k8s-Security-squad')
THEN "Security"
WHEN MATCH_REGEXP(T1.'Labels', 'ccm')
THEN "CCM"
WHEN MATCH_REGEXP(T1.'Labels', 'mms')
THEN "MMS"
WHEN MATCH_REGEXP(T1.'Labels', 'mls')
THEN "MLS"
ELSE "No Team"
END as 'Team', T1.'Assignee' as 'Owner',T1.'Due' as 'Due Date',T1.'Planned "Done" Date' as 'Planned Done Date'
FROM T1
ORDER BY T1.'Summary' ASC

The case is not working, its not able to match properly the label string, my label string have words "mco" , "Security" ,"DE" etc . 

When the label is blank it satisfy the Else part but when there is value in the label it marks everything as MCO , no matter what the label is 

1 answer

1 accepted

3 votes
Answer accepted
Stiltsoft support
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 7, 2023

Hi @gautamdey ,

The issue is in the function: use not MATCH_REGEXP(T1.'Labels', 'mco') but MATCH_REGEXP(T1.'Labels', "mco").

You should update every MATCH_REGEXP function in the query.

The 'mco' reference ( the ' ' quotes) means that you want to call out a column. The "mco" reference ( the " " quotes) means that you use a string in your query. And here our purpose is to find a specific string inside each cell. 

gautamdey
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 7, 2023

thanks for your help it worked 

Like Stiltsoft support likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events