Merge lp:~ceejatec/sfbugs2launchpad/user-mapping into lp:sfbugs2launchpad
Status: | Work in progress |
---|---|
Proposed branch: | lp:~ceejatec/sfbugs2launchpad/user-mapping |
Merge into: | lp:sfbugs2launchpad |
Diff against target: |
537 lines (+374/-25) 4 files modified
README.txt (+116/-0) convert_sf_bugs.py (+150/-25) ng/bug-export.rnc (+97/-0) ng/sf-user-map.rnc (+11/-0) |
To merge this branch: | bzr merge lp:~ceejatec/sfbugs2launchpad/user-mapping |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella | code | Pending | |
Launchpad code reviewers | Pending | ||
Abel Deuring | Pending | ||
Review via email: mp+78076@code.launchpad.net |
Commit message
- Added support for Sourceforge-
bugs are assigned to the appropriate people after import
- Actually map assignee
- Made more detailed mapping of Sourceforge Status and Resolution fields to
Launchpad's Status
- Map Sourceforge Group and Category fields (if set) to Launchpad Tags
- Add URL pointing to original Sourceforge bug (seems to be ignored by
Launchpad's import process, though)
- Added full process documentation, including creation of user-mapping
file, and also reference Relax-NG schemas
Description of the change
Added several features and upgrades (see commit message) along with full process documentation.
Unmerged revisions
- 11. By Chris Hillery
-
Added instructional README.txt with full process documentation, including
creation of the user-mapping file. Also checked in the Relax-NG schemas
for the user-mapping file and the output Launchpad bug-import file. - 10. By Chris Hillery
-
- Added support for Sourceforge-
>Launchpad user account mapping, to ensure
bugs are assigned to the appropriate people after import
- Actually map assignee
- Made more detailed mapping of Sourceforge Status and Resolution fields to
Launchpad's Status
- Map Sourceforge Group and Category fields (if set) to Launchpad Tags
- Add URL pointing to original Sourceforge bug (seems to be ignored by
Launchpad's import process, though)
Hi Chris,
lets me apologize that it needed ten days that somebody from the LP
engineering team took a look at your exciting work.
Aside from the new features which are very useful I appreciate very
much that you also wrote a good README file and added the Relax-NG
schema files.
I have a few comments on details of your changes (nothing serious,
see below), but my main concern is that the script is becoming
complex enough so that new features should be tested. (Well... the
entire code should be tested, but that's something for other branches ;)
If you don't have enough time to write some tests (which I would
understand quite well) I would file a bug roughly like "there is
great work waiting to be merged, once we have some tests" and
hopefully someone from the LP core team can take care of it soon.
And there is one blocker: Canonical requires that external www.canonical. com/contributor s . so, could you please sign it?
contributors sign a "Contributor License Agreement":
http://
> @@ -224,14 +304,29 @@ launchpad_ issue_tree( issues, options): launchpad_ issue_tree( issues, options, users): "launchpad- bugs") 'xmlns' ] = "https:/ /launchpad. net/xmlns/ 2006/bugs" "email" ] = "%<email address hidden>" % elem.text
> return date.isoformat() + 'Z'
>
>
> -def create_
> +def create_
> root = ET.Element(
> root.attrib[
>
> - def _sfuser(elem, name):
> - name = (name if name is not None else "noone").strip()
> - elem.text = name
> - elem.attrib[
> + def _mapsfuser(elem, sfusername):
> + """
> + Populates the given element as a Launchpad "person", with the
> + full name as the text along with "email" and (optionally)
> + "name" attributes, where "name" is the Launchpad username. If
> + the sfusername is found in the "users" map, the values will
> + come from there; otherwise we'll make something up.
> + """
> + if (sfusername in users):
[My comment is perhaps caused by the fact that I had recently used
an object from the "surrounding function" in a local function
inadvertently...] I would prefer if users is passsed as a parameter
to _mapsfuser(). But consider this just as a suggestion ;)
> + userdata = users[sfusername] "email" ] = userdata.email lp_user_ name
> + elem.text = userdata.full_name
> + elem.attrib[
> + if ("lp_user_name" in userdata):
> + elem.attrib["name"] = userdata.
I think lp_user_name should not appear in userdata, as such an element
is not specified in the new Relax-NG file sf-user-map.rnc. Also,
the email address provides equivalent information. So I think we don't
need the two lines above.
> + else: "email" ] = "%<email address hidden>" % elem.text
> + # We have no source of information about this Sourceforge username
> + name = (sfusername if sfusername is not None else "noone").strip()
> + elem.text = name
> + elem.attrib[
>
> for idx,issue in enumerate(issues):
> print "Handling issue %i/%i (%s) ..." % (idx+1, len(issues), issue.id)
> @@ -248,9 +343,15 @@
> ET.SubElement(bug, "title").text = issue.summary
> ET.SubEle...