Skip to content

Third-Party Bug Report

Third_party_bug_report.js is a standalone feature, independent of the Create Reports flow. It generates vendor-facing bug report Google Docs for issues that name a third-party product.

Workflow

  1. The user clicks 🐞 Report third party vendor bug. The sidebar opens with the issue on the currently selected row preselected.
  2. The user picks one or more third-party issues, optionally grouping by product.
  3. The script copies a bug-report Doc template per issue into a Third Party Vendor Bug Reports folder next to the audit spreadsheet, filling in product, company, date, title, details, browser, testing tool, success criterion, reproduction steps, and the linked asset.
  4. When "group by product" is selected, each product's individual docs are merged into a single <Product> - Bug Report doc with page breaks between issues.

Functions

Function Description Facing
runMenuThirdPartyVendorBugReport() Menu handler. Reads issues, marks the currently selected row's issue as active so the sidebar preselects it, filters to issues with a third-party product, ensures the reports folder exists, and shows the sidebar (html/third_party_bug_email.html). User-facing (menu)
getThirdPartyVendorBugReport({issues, group_by_product}) Sidebar endpoint that generates the requested reports. Skips issues that do not exist or lack a third-party product, calls createBugReportDocument per issue, and merges per-product docs when grouping is on. User-facing (sidebar)
getThirdPartyDocsFromIssueId(issueId) Sidebar endpoint that looks up already-generated reports (a specific issue ID or 'all') and returns per-issue links, with grouped per-product docs listed first. User-facing (sidebar)
createBugReportDocument(issue, template_doc, report_folder, data, company_name) Creates one bug-report Doc from the template, named Issue - <id> \| <product> - Bug Report (trashing any previous copy). Replaces all {{...}} placeholders, hyperlinks the product, company, and success-criteria text, converts the cumulative repro steps to HTML and splices them in via a throwaway temp doc, and links the asset. Internal
getRetroSteps(scenario_title, step, data) Builds the cumulative reproduction steps: all of the scenario's steps up to and including the issue's own step, numbered. Internal
insertContentAfterReproSteps(body, placeholder, tempBody) Finds a placeholder in the doc body, removes it, and inserts every child element of a temporary doc's body at that position. Internal
getFormattedDate(date) Formats a Date as Month D, YYYY for the {{DATE}} placeholder. Internal

Constant: third_party_vendor_bug_Report_template_id - the Google Doc template used for every vendor bug report.

Note

A commented-out block in createBugReportDocument would add a "Why it matters" section generated by getWhyItMattersFromOpenAi (v3/OpenAi.js). Both the call site and the API credentials are currently disabled, so the feature is inactive.