I am utilizing a jira plugin to display a list of tickets and their associated owners. I have four name fields - Operations Owner, Partner Owner, Product Owner, Engineering Owner - that come through Jira as IDs. I want to match the IDs to a name and merge the two tables together so only the persons human readable name displays.
So far, I can only figure out how to get two names to display based on SQL. Any help would be appreciated
Table 1
Summary | Operations Owner | Partner Owner | Product Owner | Engineering Owner
ABC | 123 | 111 | 112 | 145
Table 2
ID | Name
123 | John Smith
145 | John Doe
111 | Person C
112 | Person D
The Join I have so far - below displays this
ABC | 123 | Person C | Person D | 145
-----
SELECT 'Summary',
'Partner Owner',
'Name' AS 'Product Owner'
FROM
(SELECT 'Summary',
'Name' AS 'Partner Owner',
'Product Owner'
FROM T1 LEFT JOIN T2 ON T1.'Partner Owner' = T2.'ID')
LEFT JOIN T2 ON 'Product Owner' = T2.'ID'