l.b.i.b.IBugView(Interface) : interface documentation

Part of lp.bugs.interfaces.bug View In Hierarchy

Known subclasses: lp.bugs.interfaces.webservice.IBug

IBug attributes that require launchpad.View permission.
Int ownerID Undocumented
TextLine displayname Undocumented
Attribute affected_pillars The "pillars", products or distributions, affected by this bug.
Bool permits_expiration Expiration is permitted when the bug is not valid anywhere, a message was sent to the bug reporter, and the bug is associated with pillars that have enabled bug expiration.
Bool is_complete True or False depending on whether this bug is considered completely addressed. A bug in Launchpad is completely addressed when there are no tasks that are still open for the bug.
Attribute official_tags The official bug tags relevant to this bug.
Bool has_cves Undocumented
Attribute has_patches Does this bug have any patches?
Attribute latest_patch The most recent patch of this bug.
Attribute initial_message The message that was specified when creating the bug
Attribute questions List of questions related to this bug.
Attribute specifications List of related specifications.
Attribute followup_subject The likely subject of the next message.
Attribute bug_messages The bug messages related to this object.
Attribute comment_count The number of comments on this bug, not including the initial comment.
Method getSpecifications List of related specifications that the user can view.
Method isSubscribed Is person subscribed to this bug?
Method isSubscribedToDupes Is person directly subscribed to dupes of this bug?
Method isMuted Does person have a muted subscription on this bug?
Method getDirectSubscriptions A sequence of IBugSubscriptions directly linked to this bug.
Method getDirectSubscribers A list of IPersons that are directly subscribed to this bug.
Method getDirectSubscribersWithDetails Get direct subscribers and their subscriptions for the bug.
Method getIndirectSubscribers Return IPersons that are indirectly subscribed to this bug.
Method getAlsoNotifiedSubscribers Return IPersons in the "Also notified" subscriber list.
Method getSubscriptionsFromDuplicates Return IBugSubscriptions subscribed from dupes of this bug.
Method getSubscribersFromDuplicates Return IPersons subscribed from dupes of this bug.
Method getSubscribersForPerson Find the persons or teams by which person is subscribed.
Method getSubscriptionForPerson Return the BugSubscription for a Person to this Bug.
Method getSubscriptionInfo Return a BugSubscriptionInfo at the given level.
Method getBugNotificationRecipients Return a complete INotificationRecipientSet instance.
Method clearBugNotificationRecipientsCache Clear the bug notification recipient BugNotificationLevel cache.
Method canBeAQuestion Return True of False if a question can be created from this bug.
Method getQuestionCreatedFromBug Return the question created from this Bug, or None.
Method getMessagesForView Return BugMessage,Message,MessageChunks for renderinger.
Method canBeNominatedFor Can this bug nominated for this target?
Method getNominationFor Return the IBugNomination for the target.
Method getNominations Return a list of all IBugNominations for this bug.
Method getBugWatch Return the BugWatch that has the given bugtracker and remote bug.
Method getBugTask Return the bugtask with the specified target.
Method getBugTasksByPackageName Return a mapping from ISourcePackageName to its bug tasks.
Method isUserAffected Is :user: marked as affected by this bug?
Method userCanSetCommentVisibility Return True if user can set bug comment visibility.
Method getHWSubmissions Return HWDB submissions linked to this bug.
Method isExpirable Is this bug eligible for expiration and was it last updated
Method getActivityForDateRange Return all the IBugActivity for this bug in a date range.
Method shouldConfirmBugtasks Should we try to confirm this bug's bugtasks?
Method maybeConfirmBugtasks Maybe try to confirm our new bugtasks.
Method personIsDirectSubscriber Return True if the person is a direct subscriber to this IBug.
Method personIsAlsoNotifiedSubscriber Return True if the person is an indirect subscriber to this IBug.
Method personIsSubscribedToDuplicate Return True if the person subscribed to a duplicate of this IBug.
Method getAllowedInformationTypes Get a list of acceptable `InformationType`s for this bug.
Method _indexed_messages Low level query for getting bug messages.
ownerID =
Undocumented
displayname =
Undocumented
affected_pillars =
The "pillars", products or distributions, affected by this bug.
permits_expiration =
Expiration is permitted when the bug is not valid anywhere, a message was sent to the bug reporter, and the bug is associated with pillars that have enabled bug expiration.
is_complete =
True or False depending on whether this bug is considered completely addressed. A bug in Launchpad is completely addressed when there are no tasks that are still open for the bug.
official_tags =
The official bug tags relevant to this bug.
has_cves =
Undocumented
has_patches =
Does this bug have any patches?
latest_patch =
The most recent patch of this bug.
initial_message =
The message that was specified when creating the bug
questions =
List of questions related to this bug.
specifications =
List of related specifications.
followup_subject =
The likely subject of the next message.
bug_messages =
The bug messages related to this object.
comment_count =
The number of comments on this bug, not including the initial comment.
def getSpecifications(user):
List of related specifications that the user can view.
def _indexed_messages(include_content=False, include_parents=False):
Low level query for getting bug messages.
Parametersinclude_contentIf True retrieve the content for the messages too.
include_parentsIf True retrieve the object for parent messages too. If False the parent attribute will be forced to None to prevent lazy evaluation triggering database lookups.
def isSubscribed(person):
Is person subscribed to this bug?

Returns True if the user is explicitly subscribed to this bug (no matter what the type of subscription), otherwise False.

If person is None, the return value is always False.

def isSubscribedToDupes(person):
Is person directly subscribed to dupes of this bug?

Returns True if the user is directly subscribed to at least one duplicate of this bug, otherwise False.

def isMuted(person):
Does person have a muted subscription on this bug?
ReturnsTrue if the user has muted all email from this bug.
def getDirectSubscriptions():
A sequence of IBugSubscriptions directly linked to this bug.
def getDirectSubscribers(recipients=None, level=None):
A list of IPersons that are directly subscribed to this bug.

Direct subscribers have an entry in the BugSubscription table.

def getDirectSubscribersWithDetails():
Get direct subscribers and their subscriptions for the bug.

Those with muted bug subscriptions are excluded from results.

ReturnsA ResultSet of tuples (Person, BugSubscription) representing a subscriber and their bug subscription.
def getIndirectSubscribers(recipients=None, level=None):
Return IPersons that are indirectly subscribed to this bug.

Indirect subscribers get bugmail, but don't have an entry in the BugSubscription table. This subscribers from dupes, etc.

def getAlsoNotifiedSubscribers(recipients=None, level=None):
Return IPersons in the "Also notified" subscriber list.

This includes assignees, but not subscribers from duplicates.

def getSubscriptionsFromDuplicates():
Return IBugSubscriptions subscribed from dupes of this bug.
def getSubscribersFromDuplicates():
Return IPersons subscribed from dupes of this bug.
def getSubscribersForPerson(person):
Find the persons or teams by which person is subscribed.

This call should be quite cheap to make and performs a single query.

ReturnsAn IResultSet.
def getSubscriptionForPerson(person):
Return the BugSubscription for a Person to this Bug.

If no such BugSubscription exists, return None.

def getSubscriptionInfo(level=None):
Return a BugSubscriptionInfo at the given level.
ParameterslevelA member of BugNotificationLevel. Defaults to BugSubscriptionLevel.LIFECYCLE if unspecified.
def getBugNotificationRecipients(level=BugNotificationLevel.LIFECYCLE):
Return a complete INotificationRecipientSet instance.

The INotificationRecipientSet instance will contain details of all recipients for bug notifications sent by this bug; this includes email addresses and textual and header-ready rationales. See BugNotificationRecipients for details of this implementation.

def clearBugNotificationRecipientsCache():
Clear the bug notification recipient BugNotificationLevel cache.

Call this when a change to a bug or bugtask would change the notification recipients. Changing a a bugtask's milestone or target is such a case.

def canBeAQuestion():
Return True of False if a question can be created from this bug.

A Question can be created from a bug if:
1. There is only one bugtask with a status of New, Incomplete,
   Confirmed, or Wont Fix. Any other bugtasks must be Invalid.
2. The bugtask's target uses Launchpad to track bugs.
3. The bug was not made into a question previously.
def getQuestionCreatedFromBug():
Return the question created from this Bug, or None.
def getMessagesForView(slice_info):
Return BugMessage,Message,MessageChunks for renderinger.

This eager loads message.owner validity associated with the bugmessages.

Parametersslice_infoEither None or a list of slices to constraint the returned rows. The step parameter in each slice is ignored.
@operation_parameters(Reference(Interface, _('Target')))
@export_read_operation()
def canBeNominatedFor(target):
Can this bug nominated for this target?

Returns True or False.

Unknown Field: nomination_targetAn IDistroSeries or IProductSeries.
@operation_parameters(Reference(Interface, _('Target')))
@operation_returns_entry(Interface)
@export_read_operation()
def getNominationFor(target):
Return the IBugNomination for the target.

If no nomination is found, a NotFoundError is raised.

Parametersnomination_targetAn IDistroSeries or IProductSeries.
@operation_parameters(Reference(Interface, _('Target'), False), List(_('Nominations to search through.'), Reference(Interface), False))
@operation_returns_collection_of(Interface)
@export_read_operation()
def getNominations(target=None, nominations=None):
Return a list of all IBugNominations for this bug.

The list is ordered by IBugNominations.target.bugtargetdisplayname.

ParameterstargetAn IProduct or IDistribution. Only nominations for this target are returned.
nominationsThe list of nominations to search through. If none is given, the bug's nominations are looked through. This can be useful when having to call this method multiple times, to avoid getting the list of nominations each time.
def getBugWatch(bugtracker, remote_bug):
Return the BugWatch that has the given bugtracker and remote bug.

Return None if this bug doesn't have such a bug watch.

def getBugTask(target):
Return the bugtask with the specified target.

Return None if no such bugtask is found.

def getBugTasksByPackageName(bugtasks):
Return a mapping from ISourcePackageName to its bug tasks.

This mapping is suitable to pass as the bugtasks_by_package cache to getConjoinedMaster().

The mapping is from a ISourcePackageName to all the bug tasks that are targeted to such a package name, no matter which distribution or distro series it is.

All the tasks that don't have a package will be available under None.

@call_with(REQUEST_USER)
@export_write_operation()
def isUserAffected(user):
Is :user: marked as affected by this bug?
def userCanSetCommentVisibility(user):
Return True if `user` can set bug comment visibility.

This method is called by security adapters for authenticated users.

Users who can set bug comment visibility are:
- Admins and registry admins
- users in project roles on any bugtask:
  - maintainer
  - driver
  - bug supervisor

Additionally, the comment owners can hide their own comments but that
is not checked here - this method is to see if arbitrary users can
hide comments they did not make themselves.
@call_with(REQUEST_USER)
@operation_returns_collection_of(Interface)
@export_read_operation()
def getHWSubmissions(user=None):
Return HWDB submissions linked to this bug.

Only those submissions are returned which the user can access. Public submissions are always included; private submisisons only if the user is the owner or an admin.

ParametersuserThe user making the request.
ReturnsA sequence of HWDB submissions linked to this bug.
@operation_parameters(Int(_('Number of days of inactivity for which to check.'), False))
@export_read_operation()
def isExpirable(days_old=None):
Is this bug eligible for expiration and was it last updated more than X days ago?

If days_old is None the default number of days without activity is used.

Returns True or False.

def getActivityForDateRange(start_date, end_date):
Return all the IBugActivity for this bug in a date range.
Parametersstart_dateThe earliest date for which activity can be returned.
end_dateThe latest date for which activity can be returned.
def shouldConfirmBugtasks():
Should we try to confirm this bug's bugtasks?

Return True if more than one user is affected.

def maybeConfirmBugtasks():
Maybe try to confirm our new bugtasks.
def personIsDirectSubscriber(person):
Return True if the person is a direct subscriber to this IBug.

Otherwise, return False.

def personIsAlsoNotifiedSubscriber(person):
Return True if the person is an indirect subscriber to this IBug.

Otherwise, return False.

def personIsSubscribedToDuplicate(person):
Return True if the person subscribed to a duplicate of this IBug.

Otherwise, return False.

def getAllowedInformationTypes(user):
Get a list of acceptable `InformationType`s for this bug.

The intersection of the affected pillars' allowed types is permitted.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.