Merging two team account in launchpad

Asked by Khairul Aizat Kamarudzzaman

I requested the merge of two teams:

https://launchpad.net/~ubuntu-my with https://launchpad.net/~malaysianteam to be https://launchpad.net/~ubuntu-my.

We just want it to be more official Ubuntu Loco team as ~ubuntu-my already been approved as subteam of Ubuntu Local Community Teams and Approved LoCo team rather than ~malaysianteam. It easier to manage ~ubuntu-my such as contact for loco team and LoCo Directory.

We also using <email address hidden> as our mailinglist.

Could you merge these teams for me?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
[LEGACY] Canonical WebOps Edit question
Solved by:
Khairul Aizat Kamarudzzaman
Solved:
Last query:
Last reply:
Whiteboard:
LOSAs, can we do this? 20090616 danilo
Revision history for this message
Steve McInerney (spm) said :
#1

Hi, quick update for you:
Trying to make this happen, and keeps crashing.
https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-1265EB40 (for the record)

Cheers!
- Steve

Revision history for this message
Steve McInerney (spm) said :
#2

still open

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#3

so it is possible to get my request solve ?

Revision history for this message
Gavin Panella (allenap) said :
#4

This is a known bug:

  https://bugs.edge.launchpad.net/launchpad-registry/+bug/156217

I've added a comment to the bug report. Unfortunately we probably
can't proceed until that bug is fixed.

Revision history for this message
Gavin Panella (allenap) said :
#5

Reopening; I did not mean to mark it as answered.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#6

ok ... so this question will be remaining open until it got fixed :)

Revision history for this message
Julian Edwards (julian-edwards) said :
#7

As per our policy, I am marking this question closed since there is an open bug about it.

Revision history for this message
Edwin Grubbs (edwin-grubbs) said :
#8

The bug preventing this request from being completed has been fixed and landed on edge.

Please, try and merge the teams again.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#9

can someone help me merge the 2 team ....

Revision history for this message
Christian Reis (kiko) said :
#10

So I can do this, but realize that the 178 members of ~malaysianteam will have to subscribe manually to ubuntu-my. Is that okay with you, or do you want to write an API script to move them over first?

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#11

owh .. i though it can be merge just like that ..

how do i write the API script to move them over first? is it will have redundancy/replicate user in ~ubuntu-my after merging?

Revision history for this message
Christian Reis (kiko) said :
#12

It's pretty easy to write an API client to manage subscriptions to a team. Check this documentation out: http://help.launchpad.net/API/ -- basically the code you want to write would

  - fetch all users from ~malaysianteam
  - for each of them, add them to the ~ubuntu-my team

It's probably no more than 10 lines in total. Ask on #launchpad if you need any help!

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#13

i've try using the api with the help of amoog , but at last , result with this

https://bugs.edge.launchpad.net/launchpad/+bug/401979

Revision history for this message
Christian Reis (kiko) said :
#14

Leonard replied in your bug report, check it out and get back to me!

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#15

hi christian,

i already add the malaysianteam to ubuntu-my , seem everything going smoothly .. so admin launchpad will remove the malaysianteam ?

Revision history for this message
Christian Reis (kiko) said :
#16

Done. Thanks! Can you provide us with the script text so we can document it on help.launchpad.net?

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#17

thanks .. sure why not .. its written by Andreas Moog. Codes at below:

#!/usr/bin/env python

# Copyright Andreas Moog <email address hidden> 2009
# Licensed under the GPL
# coding: utf-8

import os, string, sys
from launchpadlib.errors import HTTPError

oldteam = "malaysianteam"
newteam = "ubuntu-my"

def connect_lp():
    # For now, use the staging environment
    try:
        from launchpadlib.launchpad import Launchpad, EDGE_SERVICE_ROOT
        from launchpadlib.errors import HTTPError
        from launchpadlib.credentials import Credentials
    except ImportError:
        print("ERROR: it seems that python-launchpadlib is not installed")
        exit(1)
    launchpad = None
    # the credentials and cache-dir used by py-lp-lib
    lp_cred = os.path.abspath('./lpbinding/moveteams-lplib-cred')
    lp_cache_dir = os.path.abspath('./lpbinding/cache')
    # load stored LP credentials
    try:
        print("Get Launchpad Settings")
        lp_cred_file = open(lp_cred, 'r')
        credentials = Credentials()
        credentials.load(lp_cred_file)
        lp_cred_file.close()
        launchpad = Launchpad(credentials, EDGE_SERVICE_ROOT, lp_cache_dir)
    except IOError:
        launchpad = Launchpad.get_token_and_login('moveteams', EDGE_SERVICE_ROOT, lp_cache_dir)
        lp_cred_file = open(lp_cred, 'w')
        launchpad.credentials.save(lp_cred_file)
        lp_cred_file.close()
    if launchpad is None:
        print("Something bad happened: I can't connect to Launchpad :-(.")
    print("Launchpad connection is working")
    # TODO: Implement support for arbitrary projects
    return launchpad

launchpad = connect_lp()

members = launchpad.people[oldteam].members

for member in members:
    print "Adding %s to the team" % member.display_name
    try:
        launchpad.people[newteam].addMember(person=member, status="Approved")
    except HTTPError as error:
        print "The error %s has occured" % error

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#18

thanks to all launchpad team and Andreas Moog for helping me out to merge the 2 team. i think this problem/question already solved.

Thanks Guys ...