setting nominations on a bug via the API

Bug #297458 reported by Bryce Harrington
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
William Grant
launchpadlib
Invalid
Undecided
Unassigned

Bug Description

If this functionality already exists, 1000 pardons but I didn't see how to do it from the API docs.

In Launchpad it's possible to set nominations for particular releases ("hardy", "intrepid", etc.) I'd like an API for doing this through launchpadlib as well.

An example usage of such a feature:
  * Select all bugs with "[Hardy]" in their subject line
  * Foreach such bug, add a release nomination for "hardy"

In bug 320617, Leann asks for a nomination attribute to be exposed, so the patch to fix this should include both use cases, reading and setting the nomination attribute.

Tags: api lp-bugs

Related branches

Revision history for this message
Markus Korn (thekorn) wrote :

Added malone task, because I think such a method has to be implemented in the launchpad API first

Revision history for this message
Gavin Panella (allenap) wrote :

As with many of these things, it probably only has to be implemented in Malone; launchpadlib will work with whatever is exposed by Launchpad. I'm marking the launchpadlib task as Invalid.

Changed in launchpadlib:
status: New → Invalid
description: updated
Revision history for this message
Björn Tillenius (bjornt) wrote :

This may be the last thing the security team needs in order to sync their CVE database into LP.

Changed in malone:
importance: Undecided → Medium
milestone: none → 2.2.6
status: New → Triaged
summary: - setting nominations on a bug
+ setting nominations on a bug via the API
Changed in malone:
milestone: 2.2.6 → 2.2.7
Changed in malone:
milestone: 2.2.7 → 2.2.8
William Grant (wgrant)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
William Grant (wgrant) wrote :

I have this mostly done, but there are two complications, and I'm unsure how to solve either.

 - Several IBug methods and IBugNomination.target need an interface like ISeriesBugTarget (with IProductSeries and IDistroSeries inheriting from it). I could define it as an empty interface, but that would leave IBugNomination.target without any attributes in launchpadlib for the moment. For arguments that approach is fine, though.
 - IBug.addNomination automatically approves the nomination if possible. This is a problem if you technically have permission, but should not exercise it (bug #253597). Since the UI behaviour will hopefully change to require explicit approval later, I think it should be explicit in the API from the start. Should I remove the automatic approval from IBug.addNomination, and make the view code call IBugNomination.approve?

Changed in malone:
assignee: nobody → William Grant (wgrant)
Revision history for this message
Graham Binns (gmb) wrote :

William and I spoke about this on IRC:

 - ISeriesBugTarget should descend from IBugTarget. This solves the problem of an attribute-less interface.
 - I agree that the automatic approval should be removed from IBug.addNomination().

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r9242.

Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Graham is doing the Q/A for this one.

William Grant (wgrant)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.