handlers.link_fact_sheet_by_field_handler
Whenever somebody sets a specific field value, we link this fact sheet to another fact sheet.
If somebody changes the field value to something else, we remove the link to the other fact sheet.
Configuration:
field: Name of the field to be monitored, e.g. hostingType of an Application.
relation: Type of the relation, e.g. relApplicationToITComponent.
mapping: Combinations of the value of the field and the id of the fact sheet that should be linked automatically.
Example: "saas": "abcdefff-1234-abcd-defa-12345678abcd"
Links the ITComponent abff... if the application's hostingType value is set to "saas".
description =
'Whenever somebody sets a specific field value, we link this fact sheet to another fact sheet.'
config_template =
{'fs_types': ['Application'], 'field': 'hostingType', 'relation': 'relApplicationToITComponent', 'mapping': {'saas': 'abcdefff-1234-abcd-defa-12345678abcd'}}