summaryrefslogtreecommitdiffstats
path: root/contributor_orgs/queries/current_orgs.txt
blob: af3de28bcd65829c2f73aeda601db190ab680d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
select replace(replace(u.name, ',', ''), '"', '') as name, replace(replace(org_name.field_organization_name_value, ',', ''),'"', '') as organization
from node n
inner join field_data_field_project project on project.entity_id = n.nid and project.field_project_target_id=3060 -- core
inner join field_data_field_issue_version version on version.entity_id = n.nid
inner join field_data_field_issue_status s on s.entity_id = n.nid and (s.field_issue_status_value = 2 or s.field_issue_status_value = 7)
left join taxonomy_index ti on ti.nid = n.nid
inner join comment cmt on cmt.nid = n.nid
inner join users u on u.uid = cmt.uid
inner join field_data_field_organizations org on org.entity_id = u.uid
inner join field_data_field_organization_name org_name on org.field_organizations_value = org_name.entity_id
inner join field_data_field_current current_org on org.field_organizations_value = current_org.entity_id and current_org.field_current_value = 1
where u.uid <> 180064 -- System Message
and (version.field_issue_version_value = '8.0.x-dev' or (version.field_issue_version_value = '7.x-dev' and ti.tid =  21556)) -- 8.0.x or 7.x backports
group by u.name, org_name.field_organization_name_value
;