TRUSTIVAN creates issues in a Jira Cloud project through the Jira REST API, as the Atlassian account whose API token you give it. It is not a Jira app from the Atlassian Marketplace, and nothing in Jira flows back: closing an issue in Jira does not change the finding in TRUSTIVAN. What it does do is keep the two in step from TRUSTIVAN’s side. Each fact gets one issue, labelled so it can be found again, and when the finding is resolved or suppressed in TRUSTIVAN the issue is moved to a done status.
Jira Cloud only. The requests use the v3 REST API, which Jira Data Center does not have; a Data Center site answers 404 and the destination reports the failure.

Prerequisites

  • A Jira account for TRUSTIVAN to act as, ideally a dedicated one, with permission in the project to browse, create issues and transition issues.
  • An API token for that account, created in the Atlassian account settings under Security → API tokens. It is sent with the account’s email address as HTTP Basic authentication.
  • The project key (such as SEC) and, optionally, an issue type name. Without one, issues are created as Task.
  • An administrator of the TRUSTIVAN organization, signed in with curl so cookies.txt holds the session (see the quickstart). Changing notifications needs webhooks:manage, which an API key cannot hold.
  • A plan that includes webhooks.

Create the destination

url is the site’s base URL, https:// with no path. The token goes in secret and is stored encrypted. config takes exactly email, project_key and issue_type; any other key is a 400.

What opens and closes an issue

Every issue carries a label of the form trustivan-<event>-<id>. That label is how TRUSTIVAN avoids a second issue for the same fact, and how it finds the issue again to close it. Do not remove it. To close an issue, TRUSTIVAN searches for the label, reads the issue’s available transitions and applies the one that leads to a status in Jira’s Done category, whatever the workflow calls it. If the workflow has no such transition from where the issue sits, nothing is guessed: the destination’s last_error names the issue, and you close it yourself. A finding that is resolved and then reopened within 30 days does not get a new issue, and its closed issue is not reopened: TRUSTIVAN still holds the earlier delivery for that fact. Reopen the issue in Jira if it should be tracked.

Test it

The test creates a real issue titled “Test notification from TRUSTIVAN”. Delete it in Jira.

Troubleshooting

See also