/
/
Turn a Ghost Inspector failure into one well-evidenced Jira bug
For QA and developers who want test failures raised in Jira with the evidence and links both ways, by asking their AI assistant.
On this page
Connector
Connect Jira, pick your AI tool and paste the prompt.
The problem
Test failure bugs arrive without evidence or links
Raising a useful Jira bug from a Ghost Inspector failure means copying the failing step, console errors and run details, then checking nobody filed it already. Linking the bug and the result both ways is the step usually skipped.
Without PopdockAI
- Copy the failing step and console errors
- Search Jira for an existing bug
- Write up the bug by hand
- Skip linking the bug and the test result
With PopdockAI
- The run is confirmed as failed first
- The first failing step and console errors are collected
- An existing open bug on the same test stops it
- After you confirm, one bug is created and linked both ways
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Turn Ghost Inspector test result {test-result-id} into a fully evidenced bug in the Jira project whose numeric id is {jira-project-id}, then link the Jira issue and the Ghost Inspector result to each other. This prompt writes to both systems, once each, and only after the confirmation in Step 4.
**Step 1: Confirm the failure is real**
Call `ghost-inspector-get-test-result` on the ghost-inspector server with `id` set to {test-result-id}.
If it returns nothing, report that the result id was not found and stop. If the result is passing, report that the run passed and stop without writing anything. Otherwise keep the test name, suite, browser, region, start URL, creation date and execution time.
**Step 2: Gather the evidence**
Call `ghost-inspector-get-test-step` with `test-result-id` set to {test-result-id} and `passing` set to false. Keep the first failing step in sequence order, with its command, target, value and URL. That step is where the test broke; the ones after it are usually consequences.
Call `ghost-inspector-get-console-log` with `test-result-id` set to {test-result-id} and `error` set to true, `max-records` 20. Keep the output and URL of each entry.
Call `ghost-inspector-get-test-result-comment` with `test-result-id` set to {test-result-id}. If any comment already contains the text `Ghost Inspector result id` or a Jira issue key, a ticket already exists for this result. Report that key and stop without writing anything.
**Step 3: Check Jira does not already have it**
Call `jira-get-issue` on the jira server with `summary.contains` set to the test name. If an issue is returned whose status is not Done, Closed or Resolved, report its key and stop. Do not raise a duplicate.
**Step 4: Confirm before writing**
Show the user the summary line, the failing step, the console errors, and the project id and issue type id that will be used. Ask for explicit confirmation. Do not proceed without it.
**Step 5: Raise the issue**
Call `jira-add-issue` on the jira server with `project-id` set to {jira-project-id}, `issue-type-id` set to {jira-issue-type-id}, and `summary` set to `Ghost Inspector failure: ` followed by the test name. If {assignee-account-id} was supplied, pass it as `assignee-account-id`.
`jira-add-issue` returns no fields, so the new issue's identifier does not come back. Recover it by calling `jira-get-issue` with `summary.contains` set to the same summary text and taking the most recently created match. If nothing comes back, report that the issue may have been created but could not be located, and stop rather than creating a second one.
**Step 6: Record the evidence and the link**
Call `jira-add-issue-comment` with `issue-id` set to the issue key recovered in Step 5 and `body` set to a comment containing, on separate lines: the line `Ghost Inspector result id: ` followed by {test-result-id}; the suite, browser, region and start URL; the failing step's command, target and value; and each console error. If `jira-add-issue-comment` rejects the issue key, resolve the numeric issue id by calling `jira-get-issue-watcher` with `issue-key` set to that key and reading the issue id it returns, then retry once. If it still fails, report the issue key and the comment text you were unable to post, and continue.
Call `jira-add-issue-remote-link` with the same identifier as `issue-id`, `url` set to the Ghost Inspector result URL, `title` set to the test name, `application-name` set to `Ghost Inspector`, and `global-id` set to {test-result-id}.
Call `ghost-inspector-add-test-result-comment` on the ghost-inspector server with `result-id` set to {test-result-id} and `message` set to the Jira issue key and summary.
**Step 7: Report**
State the Jira issue key, the Ghost Inspector result id, and which of the three write calls in Step 6 succeeded. Name any that did not, so the link can be completed by hand.
**Rules & Guidelines:**
* `ghost-inspector-get-test-result`, `ghost-inspector-get-test-step`, `ghost-inspector-get-console-log`, `ghost-inspector-get-test-result-comment` and `ghost-inspector-add-test-result-comment` are on the ghost-inspector server. `jira-get-issue`, `jira-get-issue-type`, `jira-add-issue`, `jira-add-issue-comment`, `jira-add-issue-remote-link` and `jira-get-issue-watcher` are on the jira server. All three servers must be connected.
* The linking convention used by every prompt on this server: a Jira issue raised from a Ghost Inspector failure has a summary beginning `Ghost Inspector failure: ` followed by the test name, and its first comment contains the line `Ghost Inspector result id: ` followed by the result id. Matching in both directions depends on this, so do not vary the wording.
* Call `jira-add-issue` at most once. If any later step fails, do not start over from Step 5.
* Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-execute-suite` or `ghost-inspector-accept-screenshot`. Re-running the test and accepting a new visual baseline are separate decisions.
* Do NOT call `jira-update-issue` or `jira-assign-issue` to change anything beyond the issue this prompt created.
**Validation:**
* If the test result has no failing steps and no console errors, still raise the issue but say plainly in the comment that no step-level or console evidence was captured.
* If {jira-project-id} or {jira-issue-type-id} is not a valid id, `jira-add-issue` will fail. Before writing, call `jira-get-issue-type` with `project-key` set to the project you expect and confirm the issue type id appears for it.
* If the user does not confirm at Step 4, stop and write nothing.Who it's for
One answer, three teams that use it
QA engineers
File bugs with the evidence attached
Turn a failed run into a bug with the failing step and console errors, in one request.
File a Jira bug in MOB for this morning's failed Login flow result in Ghost Inspector.
Developers
Get bugs you can act on
Bugs arrive with the first failing step and console output, so you can start debugging straight away.
Raise a Jira bug in WEB for the latest failed Checkout test in Ghost Inspector, with the console errors.
QA leads
Avoid duplicate test bugs
An open bug for the same test stops a second one, and both sides are linked for traceability.
Is there already a Jira bug for the failing Search results test? If not, file one in WEB.
How it works
What PopdockAI does when you ask
You give the test result and Jira project, and your AI assistant gathers the evidence and checks for a duplicate. Nothing is written until you confirm.
01
Ask
You give the test result and the Jira project.
02
Gather
It confirms the run failed and collects the first failing step and console errors.
03
Check
It looks for an open bug on the same test and stops if one exists.
04
Confirm
You approve, then it creates the bug once and links it both ways.
What PopdockAI provides
The tools behind the answer
Ready made tools for Jira and one secure connection to your AI tool. No code, no exports.
ghost-inspector-get-test-result
ghost-inspector-get-test-step
ghost-inspector-get-console-log
ghost-inspector-get-test-result-comment
jira-get-issue
jira-add-issue
jira-add-issue-comment
jira-get-issue-watcher
jira-add-issue-remote-link
ghost-inspector-add-test-result-comment
jira-get-issue-type
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
One well evidenced bug per failure
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
