~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/interfaces/bug.py

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
    'IBugAddForm',
15
15
    'IBugBecameQuestionEvent',
16
16
    'IBugDelta',
 
17
    'IBugMute',
17
18
    'IBugSet',
18
19
    'IFileBugData',
19
20
    'IFrontPageBugAddForm',
85
86
    ContentNameField,
86
87
    Description,
87
88
    DuplicateBug,
 
89
    PersonChoice,
88
90
    PublicPersonChoice,
89
91
    Tag,
90
92
    Title,
490
492
    def isMuted(person):
491
493
        """Does person have a muted subscription on this bug?
492
494
 
493
 
        :returns: True if the user has a direct subscription to this bug
494
 
            with a BugNotificationLevel of NOTHING.
 
495
        :returns: True if the user has muted all email from this bug.
495
496
        """
496
497
 
497
498
    @operation_parameters(
508
509
    @export_write_operation()
509
510
    @operation_for_version('devel')
510
511
    def unmute(person, unmuted_by):
511
 
        """Remove a muted subscription for `person`."""
 
512
        """Remove a muted subscription for `person`.
 
513
 
 
514
        Returns previously muted direct subscription, if any."""
512
515
 
513
516
    def getDirectSubscriptions():
514
517
        """A sequence of IBugSubscriptions directly linked to this bug."""
778
781
            schema=Interface, title=_('Target'), required=False),
779
782
        nominations=List(
780
783
            title=_("Nominations to search through."),
781
 
            value_type=Reference(schema=Interface), # IBugNomination
 
784
            value_type=Reference(schema=Interface),  # IBugNomination
782
785
            required=False))
783
 
    @operation_returns_collection_of(Interface) # IBugNomination
 
786
    @operation_returns_collection_of(Interface)  # IBugNomination
784
787
    @export_read_operation()
785
788
    def getNominations(target=None, nominations=None):
786
789
        """Return a list of all IBugNominations for this bug.
1210
1213
    comments = Attribute("Comments to add to the bug.")
1211
1214
    attachments = Attribute("Attachments to add to the bug.")
1212
1215
    hwdb_submission_keys = Attribute("HWDB submission keys for the bug.")
 
1216
 
 
1217
 
 
1218
class IBugMute(Interface):
 
1219
    """A mute on an IBug."""
 
1220
 
 
1221
    person = PersonChoice(
 
1222
        title=_('Person'), required=True, vocabulary='ValidPersonOrTeam',
 
1223
        readonly=True, description=_("The person subscribed."))
 
1224
    bug = Reference(
 
1225
        IBug, title=_("Bug"),
 
1226
        required=True, readonly=True,
 
1227
        description=_("The bug to be muted."))
 
1228
    date_created = Datetime(
 
1229
        title=_("The date on which the mute was created."), required=False,
 
1230
        readonly=True)