~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/doc/bug.txt

  • Committer: Muharem Hrnjadovic
  • Date: 2009-10-22 10:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 9762.
  • Revision ID: muharem@ubuntu.com-20091022103300-8pfc9tfhflewf8ax
Refactored code:

  - moved distributionsourcepackage.getBugsByNumbers() to bugset.getByNumbers()
  - purged reference to removed template from soyuz/browser/configure.zcml

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
      ...
38
38
    NotFoundError: 'Unable to locate bug with nickname +bugs.'
39
39
 
 
40
It is also possible to retrieve a number of bugs by specifying the bug numbers
 
41
of interest.
 
42
 
 
43
    >>> result_set = bugset.getByNumbers('6 1234'.split())
 
44
    >>> print result_set.count()
 
45
    1
 
46
 
 
47
    >>> [the_bug_found] = result_set
 
48
    >>> print the_bug_found.title
 
49
    Firefox crashes when Save As dialog for a nonexistent window is closed
 
50
 
 
51
    >>> result_set = bugset.getByNumbers('6 4321 1'.split())
 
52
    >>> print result_set.count()
 
53
    2
 
54
 
 
55
    >>> second_bug_found = result_set[1]
 
56
    >>> print second_bug_found.title
 
57
    Firefox does not support SVG
 
58
 
 
59
If no bug numbers are specified an empty result set is returned.
 
60
 
 
61
    >>> result_set = bugset.getByNumbers(None)
 
62
    >>> print result_set.count()
 
63
    0
 
64
    >>> result_set = bugset.getByNumbers([])
 
65
    >>> print result_set.count()
 
66
    0
 
67
 
40
68
== Bug creation events ==
41
69
 
42
70
IObjectCreatedEvent events are fired off when a bug is created. First