Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Table Transformer macro - searching for a substring in the Description field

Emil December 11, 2022

Hi,

I would like to search for a substring in the Description field, but it does not return anything although the substring is in the Description field. I've just started to check this topic on the internet and found that it is not that easy, but I would be curious if there is any workaround for that with the Table Transformer macro.

 

My SQL is the following and it does not return anything although the substring is in the Description field and with other fields searching for a substring works fine:

 

SELECT 'Key', 'Summary', 'Description',
CASE
WHEN 'Description' LIKE "%Dear%" THEN "Dear is found"
END AS 'Calc_field'
FROM T1
ORDER BY 'Key'

 

Thanks,

Emil

1 answer

1 accepted

2 votes
Answer accepted
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 13, 2022

Hi @Emil,

It seems to be smth unusual with the "Description" field parsing: your SQL query is a working one and it operates as expected with other fields coming from the Jira Issues macro. We suppose that it may come from the "\n" end of the lines, we'll look into the issue closely.
As a workaround, you may use the following query:

SELECT 'Key', 'Summary', 'Description',
CASE
WHEN MATCH_REGEXP(T1.'Description', "dear")
THEN "Dear is found"
END AS 'Calc_field'
FROM T1
ORDER BY 'Key'
It works well for me.

Emil December 14, 2022

Hi @Katerina Rudkovskaya _Stiltsoft_ ,

Thanks for the quick reply. I've tried your workaround, and I need to check the version of Table Transformer macro I use, because I've got an error message that MATCH_REGEXP is not an alasql function. As far as I could see this function was introduced during this summer.

Like Stiltsoft support likes this
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 14, 2022

Hi @[deleted],

Yes, please update the app - the current version is 9.5.2. 

Meanwhile, we've created a ticket to look into the AlaSQL library closely to see if anything can be done with the original query. Seems that it's quite a task - I'll return to this thread if we come up with any solution.

Like Stiltsoft support likes this
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 20, 2022

Hi @[deleted],

Please update the app once more - the latest version is 9.6.0. The issue with the LIKE statement was fixed by our developers.

Like # people like this
Emil December 20, 2022

Hi @Katerina Rudkovskaya _Stiltsoft_ 

Thanks a lot! And thanks for your quick reaction as well. I will do that in January and let you know if it is working.

Like # people like this
Emil January 13, 2023

Hi @Katerina Rudkovskaya _Stiltsoft_ 

I've tested it in v9.6.0 and it is working fine now. Thanks a lot for your quick support. :-)

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events