Skip to content

liaison approvers need to be calculated differently. #9457

@rjsparks

Description

@rjsparks

Describe the issue

Currently, the datatracker looks for a single person that can approve for all From groups in an outgoing liaison statement based on Roles (see

def approver_emails(self):
'''Send mail requesting approval of pending liaison statement. Send mail to
the intersection of approvers for all from_groups
'''
approval_set = set()
if self.from_groups.first():
approval_set.update(self.from_groups.first().liaison_approvers())
if self.from_groups.count() > 1:
for group in self.from_groups.all():
approval_set.intersection_update(group.liaison_approvers())
return list(set([ r.email.address for r in approval_set ]))
). This needs to change for multiple reasons.

  • The set being calculated contains Role objects - even if the same Person is the AD for all the outgoing Groups, there's a different Role object for that Person with each group, so the set will come up empty.
  • The approval really should be sent to all ADs for the From Groups. Generalizing, to all approvers for the group - sometimes that's other roles than ADs:
    def liaison_approvers(self):
    '''Returns roles that have liaison statement approval authority for group'''
    # a list of tuples, group query kwargs, role query kwargs
    GROUP_APPROVAL_MAPPING = [
    ({'acronym':'ietf'},{'name':'chair'}),
    ({'acronym':'iab'},{'name':'chair'}),
    ({'type':'area'},{'name':'ad'}),
    ({'type':'wg'},{'name':'ad'}), ]
    for group_kwargs,role_kwargs in GROUP_APPROVAL_MAPPING:
    if self in Group.objects.filter(**group_kwargs):
    # TODO is there a cleaner way?
    if self.type == 'wg':
    return self.parent.role_set.filter(**role_kwargs)
    else:
    return self.role_set.filter(**role_kwargs)
    return self.role_set.none()
    ).

At the moment, since the set can come up empty, the workaround is to manually notify approvers asking them to visit the pending tab to provide approvals.

Per discussion with @mirjak, when we replace the liaison tool, the new system will notify all potential approvers, but only one needs to approve (we will trust that approvers will coordinate out of band).

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions