Skip to main content
1-Visitor
February 19, 2016
Solved

How to get Team Members and Role information from Container

  • February 19, 2016
  • 2 replies
  • 5949 views

Hello ,

I am working on the sql script where I will need to get the product team members and role information there is any way we can do that

Best answer by BineshKumar1

If you looking for Context Team for products, this is what I used long back. This might require some tuning and optimization.

SELECT DISTINCT

pd.namecontainerinfo,

grp.name,

member.name 

FROM

(SELECT grp.name,grp.idA2A2,grp.idA3containerReference FROM WTGroup grp UNION ALL

SELECT grp.name,grp.idA2A2,grp.idA3containerReference FROM WTOrganization grp) grp,

PDMLinkProduct pd,

(SELECT member.idA2A2,member.name FROM WTGroup member UNION ALL

SELECT member.idA2A2,member.name FROM WTRolePrincipal member UNION ALL

SELECT member.idA2A2,member.name FROM WTUser member) member,

MembershipLink mlink WHERE ((grp.name not like '%_ORG%') AND (grp.name not like '%roleGro%') AND (grp.name not like '%teamMem%')) AND

((mlink.idA3A5 = grp.idA2A2) AND

(mlink.idA3B5 = member.idA2A2)

AND (grp.idA3containerReference = pd.idA2A2))

GROUP BY pd.namecontainerinfo,grp.name,member.name

ORDER BY pd.namecontainerinfo

Thank you,

Binesh Kumar

Medtronic - MITG

2 replies

1-Visitor
February 19, 2016

It will likely be through a Query. Could you be a bit more specific on where exactly you are trying to get this information from? Is it for a system-wide report to get all users and their context team roles, or for the member list on a change object (change request, change notice etc), or something else?

adev1-VisitorAuthor
1-Visitor
February 20, 2016

Hello Daryl,

I am trying to compare the users and there role with different products some of them are old products and some of them are new and I need to get the information which Product consist the Role and Members

1-Visitor
February 21, 2016

If you looking for Context Team for products, this is what I used long back. This might require some tuning and optimization.

SELECT DISTINCT

pd.namecontainerinfo,

grp.name,

member.name 

FROM

(SELECT grp.name,grp.idA2A2,grp.idA3containerReference FROM WTGroup grp UNION ALL

SELECT grp.name,grp.idA2A2,grp.idA3containerReference FROM WTOrganization grp) grp,

PDMLinkProduct pd,

(SELECT member.idA2A2,member.name FROM WTGroup member UNION ALL

SELECT member.idA2A2,member.name FROM WTRolePrincipal member UNION ALL

SELECT member.idA2A2,member.name FROM WTUser member) member,

MembershipLink mlink WHERE ((grp.name not like '%_ORG%') AND (grp.name not like '%roleGro%') AND (grp.name not like '%teamMem%')) AND

((mlink.idA3A5 = grp.idA2A2) AND

(mlink.idA3B5 = member.idA2A2)

AND (grp.idA3containerReference = pd.idA2A2))

GROUP BY pd.namecontainerinfo,grp.name,member.name

ORDER BY pd.namecontainerinfo

Thank you,

Binesh Kumar

Medtronic - MITG

adev1-VisitorAuthor
1-Visitor
February 22, 2016

Thank you so much Binesh for helping