5.7.160. Bugzilla::Extension::ExternalBugsΒΆ
5.7.160.1. NAMEΒΆ
Bugzilla::Extension::ExternalBugs
5.7.160.2. DESCRIPTIONΒΆ
External Bugs, or External Trackers, or Links, provides a way to link a Bugzilla bug to an external issue source. The user can provide extra data, such as a subject, the state of the external bug, etc. The idea is to allow a user viewing a bug in Bugzilla to have an understanding of externally related issues and an overview of the state of those issues.
A Tracker is a specific service such as bugzilla.mozilla.org. Each service can be individually configured and has a Type. Some Types, such as Bugzilla and Jira, can pull data from Trackers when a user loads the bug they are on in the web UI. This syncing must be enabled on the individual Tracker. If a Tracker has pull enabled the sync icon on the bug edit page will allow users to manually sync a linkβs data if required.
Some Types, such as Jira and SFDC, can push comments and bug fields to a Tracker when the bug is updated.
A Link can be updated or removed via the API.
There are several parameters an admin can set to control what the system is doing. See Bugzilla::Extension::ExternalBugs::Config.
Public Vs Private DataΒΆ
Trackers have 2 kinds of links, public and private.
- Public data:
- Is data that can be retrieved by Bugzilla without authentication. This data will be visible to all visitors to Bugzilla.
- Private data:
- Is all other data, itβs visibly depends on the settings in the Tracker. Users may flag public data as private when they create links, in this case the data is treated as private.
Link DisplayΒΆ
- If the tracker has always_private enabled:
- All links are treated as private and are only shown to users in the specified groups. The tracker itself will only be visible in the UI or API to users in the specified groups.
- If the Tracker does not have groups set:
- All links will be visible in full to all visitors.
- If the Tracker has groups set:
- Public links will be shown to all visitors, private links will be shown to users in the specified groups.
Privacy Setting On LinksΒΆ
When a link is created Bugzilla will flag a link as private when:
- The tracker has always_private set
- Attempting to sync the tracker without authentication fails with a 401
- The user set is_private in the API call
Note: If a services uses non-standard response codes then authentication issues may be treated as outright failures.
SyncingΒΆ
Bugzilla may try to sync data from the remote system when links are created or when a user triggers a sync. A sync can be triggered by the UI when a user loads a bug in the UI or by an API call.
- If the tracker does not have can_get set:
- Bugzilla will never attempt to sync and will use the data the user provided.
- If the tracker has can_get set:
- Bugzilla will attempt to sync without authentication.
- If the unauthenticated sync succeeds:
- Bugzilla creates a public link with the data retrieved.
- If the unauthenticated sync failed:
- If the tracker type supports authentication, and there are account details for the tracker, then Bugzilla will retry with authentication.
- If the authenticate sync succeeds:
- Bugzilla creates a private link with the data retrieved.
- If syncing failed and the tracker has must_sync set:
- Link creation will be rejected and an error will be thrown.
- If syncing failed and the tracker does not have must_sync set:
- The link will be created without any extra details and flagged as private.
5.7.160.3. MethodsΒΆ
Bugzilla::Bug::add_external_bugΒΆ
Link an ET to a bug.
Bugzilla::Bug::external_bugsΒΆ
Returns a list of ETs on a bug.
Bugzilla::Bug::external_choicesΒΆ
Returns a list if Trackers the current user can see on this bug.
Bugzilla::Bug::internal_linksΒΆ
Returns a list of ETs on a bug that are in the same Bugzilla instance.
Bugzilla::Bug::remove_external_bugΒΆ
Remove an ET from the bug.