handlers.sync_milestones_and_lifecycles_handler
Synchronizes Milestones into Lifecycle fields. In case of a timing conflict, all other conflicting lifecycle phases are updated automatically to the earliest / lastest non-conflicting value.
Configuration:
mapping: Key/value pairs of Milestone Name and lifecycle field.
conditions: Key/value pairs of a field name and a list of values. If the field's value is in the value list, the
automation is executed.
Example: "mapping": {"Start": "plan", "End": "endOfLife"}
Writes the Start milestone into the plan lifecycle and the End milestone into the endOfLife lifecycle.
description =
"Automatically copy milestones into their corresponding lifecycle fields, e.g. 'Project End' => 'End of Life'."
config_template =
{'fs_types': ['Project'], 'mapping': {'Start': 'plan', 'End': 'endOfLife'}, 'lifecycle_field': 'lifecycle', 'lifecycle_order': ['plan', 'phaseIn', 'active', 'phaseOut', 'endOfLife'], 'conditions': {'state': ['submission', 'preparation', 'alignment', 'implementation']}}
def
handle(self, event, fs, **kwargs):
Called automatically whenever a FactSheetUpdated event comes in via webhook.
Inherited Members
- handlers.eventhandler.EventHandler
- EventHandler
- get_trigger
- get_event_types
- get_fs_types
- get
- all
- lx_client
- data_requirements
- initial_sync_event
- update_with_uniqueness_check
- facet_matches
- is_tag_key
- SUBSCRIPTION_TYPES
- parse_subscription_key
- get_mapped_subscriptions
- get_notification_users
- get_send_email_for_users
- get_email_callback
- get_due_date