Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 132 additions & 18 deletions playbooks/v1_meetings/umbrella_board_meeting/board_meeting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ buf_board_meeting_create:
x-on-behalf-of: !jwt bearer=true,aud=lfx-v2-project-service,principal=clients@m2m_helper
data:
{% set meeting_id = fake.pyint(min_value=10000000000, max_value=99999999999) %}
{# Calculate initial meeting time based on `total_past_meetings`. #}
{# Calculate initial (historical) meeting time based on `total_past_meetings`. #}
{% set previous_meeting = fake.date_time_between(
start_date='-28d',
end_date='-14d',
Expand All @@ -65,13 +65,13 @@ buf_board_meeting_create:
# Renamed from `meeting_id` in v1.
id: "{{ meeting_id }}"
topic: Monthly Board Meeting
visibility: public
visibility: private
agenda: "Monthly meeting for the Big Umbrella Foundation board. {{ fake.sentence() }}"
# This is rewritten as an array to incorporate the "mappings" one-to-many table.
committees:
- uid: !ref "buf_committees.steps[?json.name == 'Governing Board']._response.uid | [0]"
filters: []
restricted: false
restricted: true
password: {{ fake.uuid4() }}
recurrence:
# 100 years from initial meeting.
Expand All @@ -85,7 +85,7 @@ buf_board_meeting_create:
# 6-digit numeric passcode.
host_key: "{{ fake.pyint(min_value=100000, max_value=999999) }}"
transcript_enabled: true
early_join_time: "10"
early_join_time: "60"
recording_enabled: true
duration: "{{ meeting_duration }}"
recording_access: public
Expand Down Expand Up @@ -114,7 +114,8 @@ buf_board_meeting_create:
meeting_type: Board
join_url: "https://zoom.example/j/{{ meeting_id }}?pwd={{ fake.pystr() }}"
transcript_access: public
start_time: "{{ meeting_start_time.isoformat() }}Z"
# Use the NEXT (future) meeting time for the scheduled meeting
start_time: "{{ next_meeting_start_time.isoformat().replace('+00:00', '') }}Z"
# Note, proj_id (sfid) in the source data will have been stripped by lfx-v1-sync-helper.
project_uid: !ref "buf_board_meeting_project_lookup.steps[0]._response"
# Note, this is later than `created_at`.
Expand All @@ -132,7 +133,21 @@ buf_board_meeting_create:
ai_summary_access: public
# 6-digit numeric passcode.
passcode: "{{ fake.pyint(min_value=100000, max_value=999999) }}"
meeting_id: "{{ meeting_id }}"
show_meeting_attendees: true
tags:
# Plain UID (for broad text search)
- "{{ meeting_id }}"
# Prefixed meeting_uid
- "meeting_uid:{{ meeting_id }}"
# Project UID
- !sub "project_uid:${buf_board_meeting_project_lookup.steps[0]._response}"
# Committee UID
- !sub "committee_uid:${buf_committees.steps[?json.name == 'Governing Board']._response.uid | [0]}"
# Title
- "title:Monthly Board Meeting"
# Meeting type
- "meeting_type:Board"

buf_board_meeting_access_update:
type: nats-publish
Expand All @@ -159,14 +174,16 @@ buf_board_meeting_committee_participants_create:
steps:
# Count matches the count in buf_board_members.
{% for i in range(board_member_count) %}
{% set registrant_id = fake.uuid4() %}
{% set registrant_username = fake.user_name() if member_has_username[i] else "" %}
- json:
action: created
headers:
authorization: !jwt bearer=true,aud=lfx-v2-project-service,principal={{ fake.user_name() }},email={{ fake.email() }}
x-on-behalf-of: !jwt bearer=true,aud=lfx-v2-project-service,principal=clients@m2m_helper
data:
# Renamed from `registrant_id` in v1.
id: "{{ fake.uuid4() }}"
id: "{{ registrant_id }}"
meeting_id: "{{ meeting_id }}"
committee: !ref "buf_committees.steps[?json.name == 'Governing Board']._response.uid | [0]"
org: !ref "buf_board_members.steps[{{ i }}].json.organization.name"
Expand All @@ -193,19 +210,31 @@ buf_board_meeting_committee_participants_create:
modified_at: "{{ fake.date_time_between(start_date='-60d', end_date='-30d').isoformat() }}Z"
# 50% chance to be empty, else use the local part of their email as a
# mock LFID username. `user_id` (sfid) is stripped by lfx-v1-sync-helper.
{% if member_has_username[i] %}
# TODO to parse from email local part.
username: {{ fake.user_name() }}
{% else %}
username: ""
{% endif %}
username: "{{ registrant_username }}"
last_name: !ref "buf_board_members.steps[{{ i }}].json.last_name"
# faker emails SHOULD be all lowercase at present.
case_sensitive_email: !ref buf_board_members.steps[{{ i }}].json.email
first_name: !ref buf_board_members.steps[{{ i }}].json.first_name
last_invite_delivered_time: "{{ fake.date_time_between(start_date='-60d', end_date='now').isoformat() }}Z"
type: committee
{% endfor %}
tags:
# Plain UID
- "{{ registrant_id }}"
# Prefixed registrant_uid
- "registrant_uid:{{ registrant_id }}"
# Meeting UID
- "meeting_uid:{{ meeting_id }}"
# First name
- !sub "first_name:${buf_board_members.steps[{{ i }}].json.first_name}"
# Last name
- !sub "last_name:${buf_board_members.steps[{{ i }}].json.last_name}"
# Email
- !sub "email:${buf_board_members.steps[{{ i }}].json.email}"
{% if registrant_username %}
# Username (only if set)
- "username:{{ registrant_username }}"
{% endif %}
{% endfor %}

buf_board_meeting_committee_participants_access_update:
type: nats-publish
Expand Down Expand Up @@ -303,6 +332,21 @@ buf_board_past_meeting_{{ past_meeting_index }}_create:
ai_summary_access: public
# TODO ... what is this? (it didn't necesesarily match recurrence.type in my test data)
type: "3"
tags:
# Plain UID (past_meeting_uid)
- "{{ meeting_id }}-{{ occurrence_id }}"
# Prefixed past_meeting_uid
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Meeting UID
- "meeting_uid:{{ meeting_id }}"
# Project UID
- !sub "project_uid:${buf_board_meeting_project_lookup.steps[0]._response}"
# Occurrence ID
- "occurrence_id:{{ occurrence_id }}"
# Committee UID
- !sub "committee_uid:${buf_committees.steps[?json.name == 'Governing Board']._response.uid | [0]}"
# Title (topic)
- "title:Monthly Board Meeting"

buf_board_past_meeting_{{ past_meeting_index }}_access_update:
type: nats-publish
Expand Down Expand Up @@ -423,6 +467,19 @@ buf_board_past_meeting_{{ past_meeting_index }}_recording_create:
recording_count: "5"
meeting_id: "{{ meeting_id }}"
recording_access: public
tags:
# Plain UID (past_meeting_recording_uid)
- "{{ meeting_id }}-{{ occurrence_id }}"
# Prefixed past_meeting_recording_uid
- "past_meeting_recording_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Past meeting UID
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Platform
- "platform:Zoom"
# Platform meeting ID
- "platform_meeting_id:{{ meeting_id }}"
# Platform meeting instance ID (session UUID)
- "platform_meeting_instance_id:{{ session_uuid }}"

buf_board_past_meeting_{{ past_meeting_index }}_recording_access_update:
type: nats-publish
Expand Down Expand Up @@ -511,6 +568,19 @@ buf_board_past_meeting_{{ past_meeting_index }}_transcript_create:
meeting_id: "{{ meeting_id }}"
# `recording_access` is filtered from the transcript object.
# recording_access: public
tags:
# Plain UID (past_meeting_transcript_uid)
- "{{ meeting_id }}-{{ occurrence_id }}"
# Prefixed past_meeting_transcript_uid
- "past_meeting_transcript_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Past meeting UID
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Platform
- "platform:Zoom"
# Platform meeting ID
- "platform_meeting_id:{{ meeting_id }}"
# Platform meeting instance ID (session UUID)
- "platform_meeting_instance_id:{{ session_uuid }}"

buf_board_past_meeting_{{ past_meeting_index }}_transcript_access_update:
type: nats-publish
Expand All @@ -537,6 +607,7 @@ buf_board_past_meeting_{{ past_meeting_index }}_transcript_access_update:
start_date=occurrence_actual_end,
end_date=occurrence_actual_end + timedelta(minutes=10),
) %}
{% set summary_id = fake.uuid4() %}

buf_board_past_meeting_{{ past_meeting_index }}_summary_create:
type: nats-publish
Expand All @@ -561,15 +632,15 @@ buf_board_past_meeting_{{ past_meeting_index }}_summary_create:
requires_approval: true
zoom_meeting_uuid: {{ session_uuid }}
edited_next_steps: null
approved: false
approved: {{ fake.pybool() }}
summary_created_time: "{{ summary_create_time.isoformat() }}Z"
password: {{ fake.uuid4() }}
summary_last_modified_time: "{{ summary_create_time.isoformat() }}Z"
summary_start_time: "{{ occurrence_actual_start.isoformat() }}Z"
summary_title: Meeting Summary for Monthly Board Meeting
zoom_meeting_topic: Monthly Board Meeting
meeting_and_occurrence_id: "{{ meeting_id }}-{{ occurrence_id }}"
id: {{ fake.uuid4() }}
id: "{{ summary_id }}"
meeting_id: "{{ meeting_id }}"
edited_summary_details: null
email_sent: true
Expand All @@ -591,6 +662,19 @@ buf_board_past_meeting_{{ past_meeting_index }}_summary_create:
{% for i in range(fake.pyint(min_value=2, max_value=5)) -%}
{{ fake.sentence() -}}
{% endfor %}
tags:
# Plain UID (past_meeting_summary_uid)
- "{{ summary_id }}"
# Prefixed past_meeting_summary_uid
- "past_meeting_summary_uid:{{ summary_id }}"
# Past meeting UID
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Meeting UID
- "meeting_uid:{{ meeting_id }}"
# Platform
- "platform:Zoom"
# Title
- "title:Meeting Summary for Monthly Board Meeting"

buf_board_past_meetings_{{ past_meeting_index }}_summary_access_update:
type: nats-publish
Expand Down Expand Up @@ -626,6 +710,7 @@ buf_board_past_meeting_{{ past_meeting_index }}_participants_create:
{% for i in range(board_member_count) -%}
{# 50-50 chance of this participant also being an attender #}
{% set is_attended = fake.pybool() %}
{% set participant_id = fake.uuid4() %}
{% if is_attended %}
{% set attendee_join_time = fake.date_time_between(
start_date=occurrence_actual_start,
Expand Down Expand Up @@ -683,15 +768,33 @@ buf_board_past_meeting_{{ past_meeting_index }}_participants_create:
leave_reason: 'left the meeting. Reason : left the meeting'
join_time: "{{ attendee_join_time.isoformat() }}Z"
participant_uuid: "{{ fake.uuid4().upper() }}"
# TODO: is this actually random, or should it match something?
id: "{{ fake.uuid4() }}"
id: "{{ participant_id }}"
# This seems wrong in the observed source data (it's false even though
# committee_voting_status is set!). Keeping as-is for fidelity.
is_committee_member: false
is_verified: true
is_unknown: false
AverageAttendance: "0"
{% endif %}
tags:
# Plain UID (past_meeting_participant_uid)
- "{{ participant_id }}"
# Prefixed past_meeting_participant_uid
- "past_meeting_participant_uid:{{ participant_id }}"
# Past meeting UID
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Meeting UID
- "meeting_uid:{{ meeting_id }}"
# First name
- !sub "first_name:${buf_board_members.steps[{{ i }}].json.first_name}"
# Last name
- !sub "last_name:${buf_board_members.steps[{{ i }}].json.last_name}"
# Email
- !sub "email:${buf_board_members.steps[{{ i }}].json.email}"
{% if member_has_username[i] %}
# Username (only if set)
- !sub "username:${buf_board_meeting_committee_participants_create.steps[{{ i }}].json.data.username}"
{% endif %}
{% endfor %}

buf_board_past_meeting_{{ past_meeting_index }}_participants_access_update:
Expand All @@ -717,6 +820,7 @@ buf_board_past_meeting_{{ past_meeting_index }}_participant_guests_create:
subject: lfx.index.v1_past_meeting_participant
steps:
{% for i in range(fake.pyint(min_value=1, max_value=2)) -%}
{% set guest_participant_id = fake.uuid4() %}
{% set attendee_join_time = fake.date_time_between(
start_date=occurrence_actual_start,
end_date=occurrence_actual_start + timedelta(minutes=meeting_duration//2),
Expand Down Expand Up @@ -752,7 +856,7 @@ buf_board_past_meeting_{{ past_meeting_index }}_participant_guests_create:
join_time: "{{ attendee_join_time.isoformat() }}Z"
participant_uuid: "{{ fake.uuid4().upper() }}"
meeting_and_occurrence_id: "{{ meeting_id }}-{{ occurrence_id }}"
id: "{{ fake.uuid4() }}"
id: "{{ guest_participant_id }}"
meeting_id: "{{ meeting_id }}"
is_verified: false
job_title: ""
Expand All @@ -767,6 +871,16 @@ buf_board_past_meeting_{{ past_meeting_index }}_participant_guests_create:
# Note, lf_user_id (sfid) is stripped by lfx-v1-sync-helper.
lf_sso: ""
committee_id: ""
tags:
# Plain UID (past_meeting_participant_uid)
- "{{ guest_participant_id }}"
# Prefixed past_meeting_participant_uid
- "past_meeting_participant_uid:{{ guest_participant_id }}"
# Past meeting UID
- "past_meeting_uid:{{ meeting_id }}-{{ occurrence_id }}"
# Meeting UID
- "meeting_uid:{{ meeting_id }}"
# Guest participants don't have first_name, last_name, email, or username
{% endfor %}

{# Find the next past meeting time based on the same day-of-week and
Expand Down