forked from github/plane
chore: email trigger for new assignee (#3572)
This commit is contained in:
parent
46ae0f98dc
commit
ac22769220
@ -353,13 +353,18 @@ def track_assignees(
|
|||||||
issue_activities,
|
issue_activities,
|
||||||
epoch,
|
epoch,
|
||||||
):
|
):
|
||||||
requested_assignees = set(
|
requested_assignees = (
|
||||||
[str(asg) for asg in requested_data.get("assignee_ids", [])]
|
set([str(asg) for asg in requested_data.get("assignee_ids", [])])
|
||||||
|
if requested_data is not None
|
||||||
|
else set()
|
||||||
)
|
)
|
||||||
current_assignees = set(
|
current_assignees = (
|
||||||
[str(asg) for asg in current_instance.get("assignee_ids", [])]
|
set([str(asg) for asg in current_instance.get("assignee_ids", [])])
|
||||||
|
if current_instance is not None
|
||||||
|
else set()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
added_assignees = requested_assignees - current_assignees
|
added_assignees = requested_assignees - current_assignees
|
||||||
dropped_assginees = current_assignees - requested_assignees
|
dropped_assginees = current_assignees - requested_assignees
|
||||||
|
|
||||||
@ -547,6 +552,20 @@ def create_issue_activity(
|
|||||||
epoch=epoch,
|
epoch=epoch,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
requested_data = (
|
||||||
|
json.loads(requested_data) if requested_data is not None else None
|
||||||
|
)
|
||||||
|
if requested_data.get("assignee_ids") is not None:
|
||||||
|
track_assignees(
|
||||||
|
requested_data,
|
||||||
|
current_instance,
|
||||||
|
issue_id,
|
||||||
|
project_id,
|
||||||
|
workspace_id,
|
||||||
|
actor_id,
|
||||||
|
issue_activities,
|
||||||
|
epoch,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def update_issue_activity(
|
def update_issue_activity(
|
||||||
|
Loading…
Reference in New Issue
Block a user