handlers.sync_tag_and_field
Whenever a tag is updated, the corresponding field value is updated as well, and vice versa.
Example: Synchronize the field Confidentiality
and the tag group Vertraulichkeit
by mapping the values as follows:
"Confidentiality/Vertraulichkeit": {
"public": "0 - Öffentlich",
"internal": "1 - Intern",
"confidential": "2 - Vertraulich",
"strictly_confidential": "3 - Streng Vertraulich"
},
description =
'Whenever a tag is updated, the corresponding field value is updated as well, and vice versa.'
config_template =
{'mapping': {'Confidentiality/Vertraulichkeit': {'public': '0 - Öffentlich', 'internal': '1 - Intern', 'confidential': '2 - Vertraulich', 'strictly_confidential': '3 - Streng Vertraulich'}, 'Availibility/Verfügbarkeit': {'downtime1': '0 - Ausfall bis 1 Woche', 'downtime2': '1 - Ausfall bis 2/3 Tage', 'downtime3': '2 - Ausfall bis 8 Stunden', 'downtime4': '3 - Ausfall bis 4 Stunden'}, 'Integrity/Integrität': {'no': '0 - Keine', 'small': '1 - Gering', 'high': '2 - Hoch', 'very_high': '3 - Sehr Hoch'}}}