datatracker/ietf/group/features.py
Ole Laursen 4c7b2847ba Add a utility function for extracting information about review
requests for a given set of teams/reviewers (making it trivial to
compute statistics), revamp the related doc event code to support this
by referencing the review request directly, add a reviewer overview
page with recent performance for each reviewer as well as
settings/unavailable periods. Fix some bugs and shuffle some of the
review code a bit around.

Finish the importer from the previous Perl-based review tool,
importing log entries, figuring out whether a given review is
early/telechat/last call and fixing corner cases.
 - Legacy-Id: 12080
2016-10-03 15:52:32 +00:00

38 lines
1.3 KiB
Python

class GroupFeatures(object):
"""Configuration of group pages and processes to have this collected
in one place rather than scattered over the group page views."""
has_milestones = False
has_chartering_process = False
has_documents = False # i.e. drafts/RFCs
has_materials = False
has_reviews = False
customize_workflow = False
about_page = "group_about"
default_tab = about_page
material_types = ["slides"]
admin_roles = ["chair"]
def __init__(self, group):
if group.type_id in ("wg", "rg"):
self.has_milestones = True
self.has_chartering_process = True
self.has_documents = True
self.customize_workflow = True
self.default_tab = "group_docs"
elif group.type_id in ("team",):
self.has_materials = True
self.default_tab = "group_about"
if self.has_chartering_process:
self.about_page = "group_charter"
from ietf.review.utils import active_review_teams
if group in active_review_teams():
self.has_reviews = True
import ietf.group.views
self.default_tab = ietf.group.views_review.review_requests
if group.type_id == "dir":
self.admin_roles = ["chair", "secr"]