<<

# Bugzilla::Extension::Review::WebService

- NAME
- METHODS
  - suggestions
  - flag_activity

# NAME

Bugzilla::Extension::Review::WebService - Functions for the Mozilla specific 'review' flag optimizations.

# METHODS

See Bugzilla::WebService for a description of how parameters are passed, and what STABLE, UNSTABLE, and EXPERIMENTAL mean.

Although the data input and output is the same for JSON-RPC, XML-RPC and REST, the directions for how to access the data via REST is noted in each method where applicable.

## suggestions

EXPERIMENTAL

Description

  Returns the list of suggestions for reviewers.

REST

  GET /rest/review/suggestions/`bug-id`

  GET /rest/review/suggestions/`product-name`

  GET /rest/review/suggestions/`product-name`/`component-name`

  GET /rest/review/suggestions?product=`product-name`

  GET /rest/review/suggestions?product=`product-name`&component=`component-name`

  The returned data format is the same as below.

Params
  Query by Bug:
    `bug_id` (integer) - The bug ID.
  Query by Product or Component:
    `product` (string) - The product name.
    `component` (string) - The component name (optional). If providing a `component`, a `product` must also be provided.
Returns

  An array of hashes with the following keys/values:

  `id` (integer) - The user's ID.
  `email` (string) - The user's email address (aka login).
  `name` (string) - The user's display name (may not match the Bugzilla "real name").
  `review_count` (string) - The number of "review" and "feedback" requests in the user's queue.

## flag_activity

EXPERIMENTAL

Description

  Returns the history of flag status changes based on requestee, setter, flag_id, type_id, or all.

REST

  GET /rest/review/flag_activity/`flag_id`

  GET /rest/review/flag_activity/requestee/`requestee`

  GET /rest/review/flag_activity/setter/`setter`

  GET /rest/review/flag_activity/type_id/`type_id`

  GET /rest/review/flag_activity/type_name/`type_name`

  GET /rest/review/flag_activity

  The returned data format is the same as below.

Params

  Use one or more of the following parameters to find specific flag status changes.

  `flag_id` (integer) - The flag ID.

    Note that searching by `flag_id` is not reliable because when flags are removed, flag_ids cease to exist.

  `requestee` (string) - The Bugzilla login of the flag's requestee
  `setter` (string) - The Bugzilla login of the flag's setter
  `type_id` (int) - The flag type id of a change
  `type_name` (string) - the flag type name of a change
  `status` (string) - The flag's current status
  `bug_id` (int) - The flag's bug id
Returns

  An array of hashes with the following keys/values:

  `flag_id` (integer)

    The id of the flag that changed. This field may be absent after a flag is deleted.

  `creation_time` (dateTime)

    Timestamp of when the flag status changed.

  `type` (object)

    An object with the following fields:

    `id` (integer)

      The id of this activity event.

    `name` (string)

      The name of the flag type (review, feedback, etc)

    `description` (string)

      A plain english description of the flag type.

    `type` (string)

      The content of the target_type field of the flagtypes table.

    `is_active` (boolean)

      Boolean flag indicating if the flag type is available for use.

    `is_requesteeble` (boolean)

      Boolean flag indicating if the flag type is requesteeable.

    `is_multiplicable` (boolean)

      Boolean flag indicating if the flag type is multiplicable.

  `setter` (object)

    The setter is the Bugzilla user that set the flag. It is represented by an object with the following fields.

    `id` (integer)

      The id of the Bugzilla user. A unique integer value.

    `real_name` (string)

      The real name of the Bugzilla user.

    `nick` (string)

      The user's nickname. Currently this is extracted from the real_name, name or email field.

    `name` (string)

      The Bugzilla login of the Bugzilla user (typically an email address).

  `requestee` (object)

    The requestee is the Bugzilla user that is specified by the flag. Optional - absent if there is no requestee.

    Requestee has the same keys/values as the setter object.

  `bug_id` (integer)

    The id of the Bugzilla bug that the changed flag belongs to.

  `attachment_id` (integer)

    The id of the Bugzilla attachment that the changed flag belongs to.

  `status` (string)

    The status of the Bugzilla flag that changed. One of `+ - ? X`.

<<