Bug 429802 and bug 255798 address the issue of having merged teams included in lists
of valid teams. After a team is merged it is an artifact with no value and should
not be seen or heard from again.
== Proposed fix ==
Fix the query in getAdministratedTeams and the vocabulary to exclude teams where
Person.merged is not null.
lib/lp/registry/doc/teammembership.txt
135: 'Unauthorized' imported but unused
== Pylint notices ==
The following lint issues are crack.
lib/lp/registry/interfaces/person.py
52: [F0401] Unable to import 'lazr.enum' (No module named enum)
54: [F0401] Unable to import 'lazr.restful.interface' (No module named restful)
55: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
62: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
406: [E1002, PersonNameField._validate] Use super on an old style class
1384: [C0322, IPersonEditRestricted.addMember] Operator not preceded by a space
status=copy_field(ITeamMembership['status']),
^
comment=Text(required=False))
@export_write_operation()
def addMember(person, reviewer, status=TeamMembershipStatus.APPROVED,
comment=None, force_team_add=False,
may_subscribe_to_list=True):
1416: [C0322, IPersonEditRestricted.acceptInvitationToBeMemberOf] Operator not
preceded by a space
comment=Text())
^
@export_write_operation()
def acceptInvitationToBeMemberOf(team, comment):
1428: [C0322, IPersonEditRestricted.declineInvitationToBeMemberOf] Operator not
preceded by a space
comment=Text())
^
@export_write_operation()
def declineInvitationToBeMemberOf(team, comment):
1720: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmembershipperiod='default_membership_period',
^
defaultrenewalperiod='default_renewal_period')
@operation_parameters(
subscriptionpolicy=Choice(
title=_('Subscription policy'), vocabulary=TeamSubscriptionPolicy,
required=False, default=TeamSubscriptionPolicy.MODERATED))
@export_factory_operation(
ITeam, ['name', 'displayname', 'teamdescription',
'defaultmembershipperiod', 'defaultrenewalperiod'])
def newTeam(teamowner, name, displayname, teamdescription=None,
subscriptionpolicy=TeamSubscriptionPolicy.MODERATED,
defaultmembershipperiod=None, defaultrenewalperiod=None):
= Summary =
Bug 429802 and bug 255798 address the issue of having merged teams included in lists
of valid teams. After a team is merged it is an artifact with no value and should
not be seen or heard from again.
== Proposed fix ==
Fix the query in getAdministrate dTeams and the vocabulary to exclude teams where
Person.merged is not null.
== Pre-implementation notes ==
None but a brief discussion with Curtis.
== Implementation details ==
As above.
== Tests ==
bin/test -vvm lp.registry -t teammembershipt.txt -t vocabularies.txt
== Demo and Q/A ==
As mark, go to https:/ /launchpad. dev/people and click on the merge teams link. Merge /lauchpad. dev/~guadamen/ +add-my- teams and ensure the hoary team is not listed.
hoary team into the guada team. Then go to
https:/
For QA, follow the instructions in bug 429802 and ensure (by hovering) that none of
the teams shown have names that end in "-merge".
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ doc/teammembers hip.txt registry/ vocabularies. py registry/ doc/vocabularie s.txt registry/ interfaces/ person. py registry/ model/person. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pyflakes Doctest notices ==
lib/lp/ registry/ doc/teammembers hip.txt
135: 'Unauthorized' imported but unused
== Pylint notices ==
The following lint issues are crack.
lib/lp/ registry/ interfaces/ person. py interface' (No module named restful) declarations' (No module named restful) fields' (No module named restful) ._validate] Use super on an old style class ricted. addMember] Operator not preceded by a space copy_field( ITeamMembership ['status' ]), Text(required= False)) write_operation () TeamMembershipS tatus.APPROVED, add=False, subscribe_ to_list= True): ricted. acceptInvitatio nToBeMemberOf] Operator not write_operation () nToBeMemberOf( team, comment): ricted. declineInvitati onToBeMemberOf] Operator not write_operation () onToBeMemberOf( team, comment): ershipperiod= 'default_ membership_ period' , walperiod= 'default_ renewal_ period' ) parameters( npolicy= Choice( _('Subscription policy'), vocabulary= TeamSubscriptio nPolicy, TeamSubscriptio nPolicy. MODERATED) ) factory_ operation( bershipperiod' , 'defaultrenewal period' ]) =None, npolicy= TeamSubscriptio nPolicy. MODERATED, ershipperiod= None, defaultrenewalp eriod=None) :
52: [F0401] Unable to import 'lazr.enum' (No module named enum)
54: [F0401] Unable to import 'lazr.restful.
55: [F0401] Unable to import 'lazr.restful.
62: [F0401] Unable to import 'lazr.restful.
406: [E1002, PersonNameField
1384: [C0322, IPersonEditRest
status=
^
comment=
@export_
def addMember(person, reviewer, status=
comment=None, force_team_
may_
1416: [C0322, IPersonEditRest
preceded by a space
comment=Text())
^
@export_
def acceptInvitatio
1428: [C0322, IPersonEditRest
preceded by a space
comment=Text())
^
@export_
def declineInvitati
1720: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmemb
^
defaultrene
@operation_
subscriptio
title=
required=False, default=
@export_
ITeam, ['name', 'displayname', 'teamdescription',
'defaultmem
def newTeam(teamowner, name, displayname, teamdescription
subscriptio
defaultmemb