list_bugs: List Bugs in a Bugzilla Database

View source: R/list_bugs.R

list_bugsR Documentation

List Bugs in a Bugzilla Database

Description

Shows the IDs, short descriptions (summaries), and other information about bugs in a Bugzilla database. The bugs can be filtered by status and date of last change. By default, the R bug tracker is queried.

Usage

list_bugs(
  category = c("open", "closed", "other", "all"),
  limit = 500,
  status = NULL,
  changed_from = NULL,
  changed_to = "Now",
  product = NULL,
  component = NULL,
  sorting = c("changed", "id", "importance", "assignee", "priority", "severity"),
  reverse = match.arg(sorting) == "changed",
  base_url = "https://bugs.r-project.org/bugzilla3/buglist.cgi"
)

Arguments

category

A character string: what kind of bugs should be listed? See ‘Details’.

limit

A non-negative integer limiting the number of bugs to show. Zero means no limit. The default is 500. There have been issues with large numbers, including the no-limit setting.

status

An optional character vector. If set, overrides category and defines the exact values for accepted bug status.

changed_from

Optional character string, date-time object of numeric value to limit the time frame of bugs shown, based on the change date and time of the bug. This is the start of the search interval. NULL (the default) means no limit. See ‘Details’.

changed_to

Like changed_from, but this is the other endpoint. Defaults to the present (no limit).

product

An optional character string which limits the bug list to a single product.

component

Like product, but only show a single component.

sorting

A character string stating the desired sorting of the results. The default "changed" orders according to the date and time of last change, while "id" uses the numerical order of the bug IDs. Also "priority" and "severity" are simple choices which sort according to one property of each bug. See ‘Details’ for the other choices.

reverse

A logical flag: reverse the order of results? The default for sorting = "changed" is TRUE (most recently changed first), otherwise FALSE.

base_url

URL of a Bugzilla bug list page. Defaults to R Bugzilla.

Details

The category option accepts a number of choices. The default ("open") returns bugs that have one of the following as their status: NEW, ASSIGNED, REOPENED, UNCONFIRMED. The other choices are "closed" which covers bugs with the CLOSED status, "other" for bugs with a WISH, RESOLVED, or VERIFIED status, and "all" for listing bugs with any status.

To limit the results by date and time of last change, use changed_from and changed_to. These options accept a date in the standard YYYY-MM-DD (year, month, day) notation or a relative date-time, for example "-2d" for “two days ago” including the time of day. The following abbreviations can be used in relative date-times: "y" for year, "m" for month, "w" for week, "d" for day and "h" for hour. Numeric values may also be used, and they are interpreted as days relative to the current date. The standard date-time classes are also supported, but only the date part will be utilized. Note that the option to use numeric and date-time types is a convenience feature provided by this function. Thus, they are eventually transmitted to the server as YYYY-MM-DD, which apparently refers to the beginning of the day. See ‘Examples’.

The sorting argument has two choices which sort according to multiple properties of each bug: "importance" uses "priority" and "severity" (in this order), whereas with "assignee" the sort order is primarily based on the person to whom the bug is assigned to, but also on the bug status, priority and ID (in this order).

This function extracts information from an HTML document presenting the bug list. Therefore some results are presented in an abbreviated form. More detailed information about selected bugs can be obtained with bug_info and bug_history.

Value

a tibble, with rows representing bugs and the following columns representing their properties:

id

Unique bug ID (integer).

summary

Short description of bug (character).

link

URL to detailed bug report web page (character).

product

Product where the bug occurs (character).

component

Which part of the product is affected? (character)

assignee

To whom is the bug assigned? (character)

status

Abbreviated status of bug (character): "UNCO"(NFIRMED), "NEW", "CLOS"(ED), ...

resolution

Together with "status", defines the current state of the bug: "FIXE"(D), "WONT"(FIX), "WORK"(SFORME), "INVA"(LID), ...

changed

(Date and) time of last change (character). The format may be irregular.

Examples

## Not run: 
## Several ways to get open bugs without time limit
bugs1a <- list_bugs() # changed_to = "Now"
bugs1b <- list_bugs(changed_to = 1)
bugs1c <- list_bugs(changed_to = Sys.Date() + 1)
bugs1d <- list_bugs(changed_to = as.character(Sys.Date() + 1))

## List bugs in reverse order.
## Note that reverse = TRUE is default for sorting = "changed", which
## means most recent first. So, reverse = FALSE is oldest first.
bugs2 <- list_bugs(reverse = FALSE)
identical(bugs1a$id, rev(bugs2$id)) # TRUE if bug database did not change

## Get all bugs changed during the last week, sorted according to priority
bugs3 <- list_bugs(category = "all", changed_from = "-1w",
                   sorting = "priority")

## Override predefined bug categories to look for ASSIGNED bugs
bugs4 <- list_bugs(status = "ASSIGNED")

## End(Not run)

mvkorpel/bugtractr documentation built on Aug. 31, 2022, 1:16 p.m.