Skip to content
Snippets Groups Projects
Commit e2dc042a authored by Robert Latta's avatar Robert Latta
Browse files

updated source for populating contacts RE DBOARD3-663

parent a1e5999a
Branches
Tags
No related merge requests found
......@@ -109,18 +109,14 @@ def get_service_types(ds: IMS):
def get_customer_service_emails(ds: IMS):
customer_contacts = defaultdict(set)
for x in ds.get_filtered_entities(
'customerrelatedcontact',
"contact.plannedworkmail != '' | contact.mail != ''",
CUSTOMER_RELATED_CONTACT_PROPERTIES['Contact']
):
customer_contacts[x['customerid']].add(x['contact']['mail'])
for x in ds.get_filtered_entities(
'customerrelatedcontact',
"contact.troubleticketMail != '' | contact.mail != ''",
"contact.troubleticketMail != ''",
CUSTOMER_RELATED_CONTACT_PROPERTIES['Contact']
):
customer_contacts[x['customerid']].add(x['contact']['mail'])
customer_contacts[x['customerid']].add(
x['contact']['troubleticketMail'])
for k, v in customer_contacts.items():
yield k, sorted(list(v))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment