System to sync Bugzilla bugs to Jira issues.
- The system accepts webhook events from Bugzilla
- Bugs'
whiteboardtags are used to determine if they should be synchronized or ignored - The events are transformed into Jira issues
- The system sets the
see_alsofield of the Bugzilla bug with the URL to the Jira issue
Note: whiteboard tags are string between brackets, and can have prefixes/suffixes using dashes (eg.
[project],[project-fx-h2],[backlog-project]).
graph TD
subgraph bugzilla services
A[Bugzilla] -.-|bugzilla event| B[(Webhook Queue)]
B --- C[Webhook Push Service]
end
D --> |create/update/delete issue| E[Jira]
D<-->|read bug| A
D -->|update see_also| A
subgraph jira-bugzilla-integration
C -.->|post /bugzilla_webhook| D{JBI}
F["config.{ENV}.yaml"] ---| read actions config| D
end
-
Submit configuration for your project
- If you're comfortable opening your own pull request, add an entry for your whiteboard tag (eg.
famous-product) in the actions configuration files. See actions documentation - If not, submit an issue here, and we'll set up your configuration
- If you're comfortable opening your own pull request, add an entry for your whiteboard tag (eg.
-
Grant permissions to the Jira Automation Bot
-
If you are an admin of the Jira project
- go to your Jira project and open
Project Settings, thenPeople. - Select
Add Peopleand search forJira Automation. If two are listed select the one with the green logo - From the
Rolesdrop down selectBots. ClickAdd 1 person. - Add these permissions for the bot
"ADD_COMMENTS", "CREATE_ISSUES", "DELETE_ISSUES", "EDIT_ISSUES" - go to your Jira project and open
-
If you are not an admin of the Jira project, contact the admin or reach out to
#jira-supportin Slack to determine how best to request the changes described above
-
-
Once your configuration is merged and a JBI release is deployed, create a bug in Bugzilla and add your whiteboard tag to the bug. Note that the tag must be enclosed in square brackets (eg.
[famous-project]). You should see an issue appear in Jira- If you want to start syncing a bug to a Jira issue that already exists, add the issue's link to the
See Alsosection of the Bugzilla bug before you add the whiteboard tag
- If you want to start syncing a bug to a Jira issue that already exists, add the issue's link to the
-
Verify that the action you took on the bug was property reflected on the Jira issue (e.g. the description was updated or a comment was added)
make start: run the application locally (http://localhost:8000)make test: run the unit tests suitesmake lint: static analysis of the code basemake format: automatically format code to align to linting standards
In order to pass arguments to pytest:
poetry run pytest -vv -k test_bugzilla_list_webhooks
You may consider:
- Tweaking the application settings in the
.envfile (See jbi/environment.py for details) - Installing a pre-commit hook to lint your changes with
pre-commit install