Merge lp://staging/~bryce/launchpad/lp-617698-forwarding into lp://staging/launchpad/db-devel
Status: | Rejected |
---|---|
Rejected by: | Curtis Hovey |
Proposed branch: | lp://staging/~bryce/launchpad/lp-617698-forwarding |
Merge into: | lp://staging/launchpad/db-devel |
Prerequisite: | lp://staging/~bryce/launchpad/lp-617695-linkui |
Diff against target: |
1109 lines (+705/-45) 17 files modified
lib/canonical/launchpad/scripts/bzremotecomponentfinder.py (+6/-2) lib/lp/bugs/browser/bugalsoaffects.py (+23/-7) lib/lp/bugs/browser/bugtracker.py (+106/-4) lib/lp/bugs/browser/configure.zcml (+9/-0) lib/lp/bugs/browser/tests/bugtask-adding-views.txt (+1/-1) lib/lp/bugs/browser/tests/test_bugtracker_component.py (+189/-0) lib/lp/bugs/browser/widgets/bugtask.py (+20/-0) lib/lp/bugs/doc/bugtracker.txt (+13/-20) lib/lp/bugs/interfaces/bugtracker.py (+8/-2) lib/lp/bugs/model/bugtracker.py (+29/-9) lib/lp/bugs/templates/bugtracker-edit-component.pt (+16/-0) lib/lp/bugs/templates/bugtracker-index.pt (+2/-0) lib/lp/bugs/templates/bugtracker-portlet-components.pt (+36/-0) lib/lp/registry/configure.zcml (+1/-0) lib/lp/registry/interfaces/sourcepackage.py (+2/-0) lib/lp/registry/model/sourcepackage.py (+11/-0) lib/lp/services/features/scopes.py (+233/-0) |
To merge this branch: | bzr merge lp://staging/~bryce/launchpad/lp-617698-forwarding |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | code | Approve | |
Bryce Harrington (community) | Needs Resubmitting | ||
Review via email: mp+41003@code.staging.launchpad.net |
Commit message
Implement remote_component support when forwarding bugs.
Description of the change
Implement remote_component support when forwarding bugs.
This branch is dependent on the lp:~bryce/launchpad/lp-617695-linkui so that branch should be landed first.
This causes the 'component' field to be properly filled in for the bugzilla submission page when forwarding a bug report to a remote project.
lint has been checked. ec2 test has been run and passed successfully.
== Testing ==
For manual testing of this feature locally, I first ran cronscripts/
[ Next I turned the feature flag on via the psql statement 'insert into featureflag (scope, priority, flag, value) values ('default', 1, 'bugtracker_
Next, I configured the alsa-utils project as using the gnome bugzilla, at https:/
Navigating to https:/
I logged out, and verified as anonymous that the edit links don't show up on https:/
Finally, after re-logging in, I filed a new bug report against alsa-utils, clicked "Also affects project", clicked the "bug filing form" link, and verified it filled in the component field in the bugzilla form properly.
Unmerged revisions
- 9968. By Bryce Harrington
-
Review from jeroen: Move component/
sourcepackage check to a new
member function of SourcePackage. - 9967. By Bryce Harrington
-
Review from jeroen: Typo for "searched"?
- 9966. By Bryce Harrington
-
Review from jeroen: "Commented-out code is a bad thing."
- 9965. By Bryce Harrington
-
Review from jeroen: "Also note that a count() on the query can be
relatively expensive and deliver more information than you need. If all
you need to know is whether there are any at all, use is_empty() instead" - 9964. By Bryce Harrington
-
Re-merge db-devel trunk
- 9963. By Bryce Harrington
-
Revert Jeroen's change for component form so editing components works.
In review, Jeroen noticed I had an ugly if clause to look up the source
package name field for the component edit form, and suggested replacing
it with a dict to look up the fields.Unfortunately, it's not so simple. The SourcePackageName object is not
a string property, so has to be handled differently than other kinds of
objects (we have to explicitly reference it's .name field to get the
string out of it). So the None check and special handling of this field
is required. Otherwise, an Oops occurs when it tries to fill in the
package name field with the object rather than the string. - 9962. By Bryce Harrington
-
Compare string against the '.name' field of DSP rather than object itself.
- 9961. By Bryce Harrington
-
Adjust to new widgets location
- 9960. By Bryce Harrington
-
Re-merge db-devel trunk
- 9959. By Bryce Harrington
-
Giving up on feature flags stuff and ripping it out.
The flags work fine in the browser when setting the flag manually, but
I just can't sort out how to get the unittests to recognize it. This
issue has been blocking progress on this branch for months now, and I've
failed to find anyone who can explain how to make it work properly.
Martin Pool suggested just dropping it and moving on, which sounds good
to me.
Hi Bryce,
There's lots of stuff that I'm unfamiliar with here, so please forgive me for holding you up with a "Needs Information" vote. I have some big questions about the UI and test coverage.
Otherwise it would be Approved, with some smaller notes and superficial issues.
> === modified file 'lib/canonical/ launchpad/ scripts/ bzremotecompone ntfinder. py' launchpad/ scripts/ bzremotecompone ntfinder. py 2010-10-20 00:24:50 +0000 launchpad/ scripts/ bzremotecompone ntfinder. py 2010-11-16 19:54:52 +0000 bugzilla_ text = static_ bugzilla_ text tsAndComponents (self, bugtracker_ name=None) :
> --- lib/canonical/
> +++ lib/canonical/
> @@ -117,7 +117,6 @@
> self.static_
>
> def getRemoteProduc
> - """"""
There's supposed to be a docstring. It looks as if this one was put in
as a placeholder: "I'll write one later, and if I forget, the reviewer
will spot it." Can you think of what they mant to write?
The fact that this got into the codebase may be a clue that we're
being too sloppy in our reviews.
> === modified file 'lib/canonical/ widgets/ bugtask. py' widgets/ bugtask. py 2010-11-08 12:52:43 +0000 widgets/ bugtask. py 2010-11-16 19:54:52 +0000 kageNameWidget( ckageNameWidget ):
> --- lib/canonical/
> +++ lib/canonical/
> @@ -495,6 +495,25 @@
> return distribution
>
>
> +class UbuntuSourcePac
> + BugTaskSourcePa
Why is this line broken? There's plenty of space. Did you rename this
from a longer original name?
> + """Package widget where the distribution can be assumed as Ubuntu
There should be a full stop at the end of the sentence.
> + distribution_name = "ubuntu" (self): ackageNameWidge t`""" IDistributionSe t).getByName( on_name) on_name)
> +
> + def getDistribution
> + """See `BugTaskSourceP
> + distribution = getUtility(
> + self.distributi
> + if distribution is None:
> + raise UnexpectedFormData(
> + "No such distribution: %s" % self.distributi
> + return distribution
Would it be worth having a comment here to say why you have to override
this method?
Also, doesn't this method amount to a difficult spelling for
return getUtility( ILaunchpadCeleb rities) .ubuntu
?
> === modified file 'lib/lp/ bugs/browser/ bugalsoaffects. py' bugs/browser/ bugalsoaffects. py 2010-09-03 03:12:39 +0000 bugs/browser/ bugalsoaffects. py 2010-11-16 19:54:52 +0000 bugtracker. getRemoteCompon entGroup( remote_ product) 'add_packaging' , False): target. sourcepackagena me components: distro_ source_ package is not None and distro_ source_ package. name == package_name):
> --- lib/lp/
> +++ lib/lp/
> @@ -664,8 +664,20 @@
> title = bug.title
> description = u"Originally reported at:\n %s\n\n%s" % (
> canonical_url(bug), bug.description)
> + remote_component = ""
> + comp_group = target.
> + target.
> +
> + # Look up the remote component if we have the necessary info
> + if comp_group is not None and data.get(
> + package_name = self.context.
> + for component in comp_group.
> + if (component.
> + component.
> + ...