You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.
Join groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Good morning community!
I am trying to join two tables together, but my 'key' contains multiple items within a given cell. Is there a way to index through each item within the cell to check for a match / join?
In the top table key SR-3679 is "tested by" three different "TER" links. The bottom table provides the details for the individual "TER" issues. I need to be able to either:
Any suggestions, please!
Hi @Emily Berg ,
We've recreated your case here:
If you have the only one type of keys (TER-XX), then we suggest using the following SQL query (it will be a more reliable one):
SELECT * FROM T1
LEFT JOIN T2 ON T1.'Tested by'->split("TER-")->indexOf(REPLACE(T2.'TER Key', "TER-", "")) > -1
If you have other types of projects (keys), then you may use a simpler query:
SELECT * FROM T1
LEFT JOIN T2 ON T1.'Tested by'->indexOf(T2.'TER Key') > -1
Hope this helps your case.
@Katerina Kovriga _Stiltsoft_ ,
This is AWESOME! Thank you very much for the response! Could you elaborate on why the first solution would be more reliable (for my own edification)?
Emily
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first variant splits and then joins your keys strictly - as you can see, there is the name of your project "TER-" included into the 'split' and 'indexOf' sql functions.
If you work with another project, then you'll have other keys (for example, WER-13, WER-15, etc.) and put "WER-" for 'split' and 'indexOf' functions.
The second variant is a more general and simple one. It works, but the result table should be checked manually at first if you have multiple project names with similar key indexes to prevent any mismatching.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are these tables a result of JIRA filters?
Anyway, if I understood your question right, then this might help:
You already have the table for SR issues (let this be T1)
Filter and create a separate table for all TER issues affected in your SR table(let this be T2), then with these 2 tables in the same table transformer macro:
SELECT
(SELECT T1.'Key' FROM T1 WHERE T2.'TER Key' IN T1.'Tested By') AS 'SR Key',
T2.'TER Key',
T2.'TER Summary',
...
any other columns
...
FROM T2
This way you will have something like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kántor Tibor - Thanks for the response. This works only for the first row of T1 data. I need to be able to loop this function through a large T1 with multiple rows. Is there a way to incorporate a while loop or something similar to index through the entire T1 table?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure why... I have the same setup, separating linked issues to different rows, and it loops through the whole T1 table. Might not be a while loop issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Calling all Confluence Cloud Admins! We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.