~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Curtis Hovey
  • Date: 2011-12-18 15:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 14547.
  • Revision ID: curtis.hovey@canonical.com-20111218151307-sdm2gzobt5tplbe0
Moved badges to lp.app.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
To create a bug task, you have to be logged in:
25
25
 
26
 
    >>> from lp.testing import login, ANONYMOUS
 
26
    >>> from canonical.launchpad.ftests import login, ANONYMOUS
27
27
    >>> login('foo.bar@canonical.com')
28
28
 
29
29
There are three kinds of bug tasks. We need to pass the bug task creation
296
296
We'll open a bug on just the distribution, and also a bug on a specific
297
297
package.
298
298
 
299
 
    >>> from lp.services.webapp.interfaces import ILaunchBag
 
299
    >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
300
300
    >>> from lp.bugs.interfaces.bug import CreateBugParams
301
301
    >>> launchbag = getUtility(ILaunchBag)
302
302
    >>> params = CreateBugParams(
737
737
    ...     ["id", "title", "private"])
738
738
    >>> notify(bug_set_private)
739
739
 
740
 
    >>> from lp.services.database.sqlbase import flush_database_updates
 
740
    >>> from canonical.database.sqlbase import flush_database_updates
741
741
    >>> flush_database_updates()
742
742
 
743
743
If we now login as someone who was neither implicitly nor explicitly
761
761
The private bugs will be invisible to No Privileges Person in the search
762
762
results:
763
763
 
764
 
    >>> from lp.services.searchbuilder import any
 
764
    >>> from canonical.launchpad.searchbuilder import any
765
765
    >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
766
766
    >>> params = BugTaskSearchParams(
767
767
    ...     status=any(STATUS_NEW, STATUS_CONFIRMED),
1025
1025
    # XXX Guilherme Salgado 2005-11-07:
1026
1026
    # If we don't call flush_database_caches() here, we won't see the
1027
1027
    # changes made by the cronscript in objects we already have cached.
1028
 
    >>> from lp.services.database.sqlbase import flush_database_caches
 
1028
    >>> from canonical.database.sqlbase import flush_database_caches
1029
1029
    >>> flush_database_caches()
1030
1030
    >>> transaction.commit()
1031
1031