handlers.set_field_on_field_update_handler
Whenever a fact sheet field changes to a specific field value, we set another field to a target value.
You can use this to catch manual lifecycle changes, which you cannot do in LeanIX Automations.
Configuration:
field
: Name of the field to be monitored, e.g. lifecycle
of an Application.
condition
: Key/value pair that will be checked, e.g. lifecycle_status
: endOfLife
. If the condition holds
true, we will set the field as specified.
mapping
: Combinations of the value of the field and the value of the target field.
Example: "endOfLife": "inactive"
Sets an application to inactive
if somebody manually changes its lifecycle to endOfLife
.
description =
'Whenever somebody sets a specific field value, we set another field to a target value. Very helpful for catching a manual lifecycle change to endOfLife.'
config_template =
{'fs_types': ['Application'], 'field': 'lifecycle', 'condition': {'lifecycle_status': 'endOfLife'}, 'target_field': 'operatingStatusAutomationTrigger', 'mapping': {'endOfLife': 'yes'}}