Forums

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

Table transformer to do string operations on Jira status result

emagnun
Contributor
November 18, 2021

In the below table, "Jira Task" column uses Jira macro to pull the info. Now how do I retrieve the status string (DONE/TO DO/IN PROGRESS) from "Jira Task" column and fill in the "Status" column? I assume I can use table transformer but I'm not sure how to do. 

Capture.JPG

Output to user now, is as below. Expectation is "Status" column should have the jira status string that I can use for further operations and keep "Jira Task" column as it is.

Capture.JPG

1 answer

1 accepted

1 vote
Answer accepted
Katerina Kovriga _Stiltsoft_
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.
November 18, 2021

Hi @emagnun ,

You may try the following SQL query:

SELECT T1.'Product', T1.'Customer', T1.'Jira Task',
CASE
WHEN
T1.'Jira Task'->split(" ")->1 LIKE "In"
THEN
(T1.'Jira Task'->split(" ")->1 + " " + T1.'Jira Task'->split(" ")->2)
WHEN
T1.'Jira Task'->split(" ")->1 LIKE "To"
THEN
(T1.'Jira Task'->split(" ")->1 + " " + T1.'Jira Task'->split(" ")->2)
ELSE
T1.'Jira Task'->split(" ")->1
END
AS 'Status',
T1.'Note'
FROM T1

Thu 3-1.png 

emagnun
Contributor
November 22, 2021

Thanks 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events