Confluence Table Transformer: how to get name from id for multiple fields?

Bindiya Chacko April 2, 2023

Hi Confluence Team,

Using Table Transformer, how can i get name from id for multiple fields. 

Screenshot 2023-04-02 at 7.56.39 PM.png

1 answer

4 votes
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 3, 2023

Hi @Bindiya Chacko,

If you mean that you want to transform the IDs coming from your Jira Issues macro into usernames automatically, then it can’t be done via the Table Transformer macro.

The macro works with the data coming from the Jira Issues macro. So, if your Jira Issues macro returns IDs (and not “pretty” usernames), then the Table Transformer macro also recognizes these IDs and works with them. Only the Jira Issues macro “goes” to Jira to pull your data and the Table Transformer macro just works with the returned results.

So, to get “pretty” usernames in the result table, I can suggest using an additional reference table: “ID” = “Name”. Then you’ll be able to match these records with the required columns from the original table.

Please see the example below:

Mon 1-1.png

SELECT 'Project',
'Lead',
'Name' AS 'Approver'
FROM
(SELECT 'Project',
'Name' AS 'Lead',
'ID Approver'
FROM T1 LEFT JOIN T2 ON T1.'ID Lead' = T2.'ID')
LEFT JOIN T2 ON 'ID Approver' = T2.'ID'

Mon 1-2.png

Hope it helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events