User Tools
Writing /app/www/public/data/meta/onboarding/snmpmanager/introduction_to_contacts_and_associated_responsibilities.meta failed
onboarding:snmpmanager:introduction_to_contacts_and_associated_responsibilities
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| onboarding:snmpmanager:introduction_to_contacts_and_associated_responsibilities [2017/05/17 14:51] – mmcc | onboarding:snmpmanager:introduction_to_contacts_and_associated_responsibilities [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Contacts & Contact Responsibilities ====== | ||
| + | Author: Michelle McCausland | ||
| + | |||
| + | **Note:** Use the queries in the sections below to learn how these tables are linked together. | ||
| + | |||
| + | ===== Contacts ===== | ||
| + | Contacts are types of users that are assigned to network elements via contact responsibilities. | ||
| + | |||
| + | Contacts and contact responsibilities are utilised in the Tickteter application to denote the owner of tickets ( [[onboarding: | ||
| + | |||
| + | Information on adding, updating and deleting contacts can be found in the SNMP Manager Admin User Guide which is available on the Errigal support page. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Contact Responsibilities ===== | ||
| + | Contact responsibilities denote a contact' | ||
| + | |||
| + | Information on adding, updating and deleting contact responsibilities can be found in the SNMP Manager Admin User Guide which is available on the Errigal support page. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== SQL to retrieve contacts and their responsibilities ===== | ||
| + | //For reference only - please verify all SQL statements before executing.// | ||
| + | < | ||
| + | SELECT | ||
| + | cr.contact_id as contactId, | ||
| + | c.first_name, | ||
| + | cr.responsibility_type as responsibilityType, | ||
| + | ne.id as elementId, | ||
| + | ne.name as neName | ||
| + | FROM | ||
| + | snmp_manager.contact c | ||
| + | JOIN snmp_manager.contact_responsibility cr ON c.id = cr.contact_id | ||
| + | JOIN snmp_manager.network_element ne ON cr.element_id = ne.id | ||
| + | WHERE | ||
| + | cr.contact_id = <ID OF CONTACT>; | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== SQL to copy contact responsibilities from one contact to another ===== | ||
| + | //For reference only - please verify all SQL statements before executing.// | ||
| + | < | ||
| + | INSERT INTO contact_responsibility (version, element_id, rank, responsibility_type, | ||
| + | (SELECT | ||
| + | 0 AS version, | ||
| + | cr.element_id AS element_id, | ||
| + | cr.rank AS rank, | ||
| + | cr.responsibility_type AS responsibility_type, | ||
| + | [id of contact that is being copied TO] AS contact_id | ||
| + | FROM | ||
| + | contact_responsibility cr JOIN | ||
| + | contact co ON co.id = cr.contact_id | ||
| + | WHERE | ||
| + | co.id = [id of contact that is being copied FROM]); | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== SQL to copy contact responsibilities from one element to another ===== | ||
| + | //For reference only - please verify all SQL statements before executing.// | ||
| + | < | ||
| + | INSERT INTO contact_responsibility (version, element_id, rank, responsibility_type, | ||
| + | (SELECT | ||
| + | 0 AS version, | ||
| + | [id of element that is being copied TO] AS element_id, | ||
| + | cr.rank AS rank, | ||
| + | cr.responsibility_type AS responsibility_type, | ||
| + | cr.contact_id AS contact_id | ||
| + | FROM | ||
| + | contact_responsibility cr | ||
| + | JOIN network_element ne ON ne.id = cr.element_id | ||
| + | WHERE | ||
| + | ne.id = [id of element that is being copied FROM]); | ||
| + | </ | ||
| + | |||
| + | ===== Useful Info ===== | ||
| + | * As of the time of writing - 17th May 2017 - There is a constraint in the code that prevents a contact from having more than 1 responsibility type per network element - See [[https:// | ||