Conversation
Adds POST /feedback, which accepts a bug report or feature request from any authenticated user and does two things: 1. Creates a Jira issue in the BDMS project using the Jira API v3 2. Optionally posts a Slack notification if SLACK_FEEDBACK_WEBHOOK_URL is set Bug reports create a Jira Bug issue with severity and a link to the page where the report was filed. Feature requests create a Jira Task with the problem description, intended audience, and expected behaviour. Slack notification is best-effort — if it fails the HTTP response still returns the Jira key and URL so the UI can confirm the report was filed. Three env vars are required (JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN). JIRA_DEFAULT_PROJECT defaults to BDMS. SLACK_FEEDBACK_WEBHOOK_URL is optional and will be provided separately.
Fetch jira-email, jira-api-token, and slack-feedback-webhook-url from Secret Manager in all three deploy workflows and render them into the App Engine config alongside JIRA_BASE_URL / JIRA_DEFAULT_PROJECT repo vars (with sensible defaults). The deploy service account needs roles/secretmanager.secretAccessor on these secrets in each project. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds
POST /feedback, a new authenticated endpoint that accepts a bug report or feature request submitted from the Ocotillo UI and does two things:Endpoint
Bug report payload
{ "type": "bug", "page_url": "https://ocotillo.nmbgmr.nmt.edu/ocotillo/well", "reporter_name": "Jane Field", "reporter_email": "jane@nmt.edu", "browser": "Chrome 125", "submitted_at": "2026-06-11T20:00:00Z", "what_happened": "The export button does nothing when I click it.", "severity": "High" }Feature request payload
{ "type": "feature", "page_url": "https://ocotillo.nmbgmr.nmt.edu/ocotillo/well", "reporter_name": "Jane Field", "problem": "I can't filter wells by aquifer.", "who_would_use": "Hydrogeologists running regional studies", "what_it_should_do": "Add an aquifer dropdown to the wells filter bar." }Response
{ "jira_key": "BDMS-999", "jira_url": "https://nmbgmr.atlassian.net/browse/BDMS-999" }What gets created in Jira
Bug, priority mapped from severity (Low/Medium/High), description includes what happened, severity, and context (page, reporter, browser, timestamp)Task, priority Medium, description includes the problem, who would use it, and what it should doWhat gets posted to Slack
A formatted Slack message with the Jira ticket link, reporter name, page URL, and a summary of the report. The Slack notification is best-effort — if the webhook call fails, the endpoint still returns the Jira key to the UI so the user sees confirmation.
Files changed
api/feedback.pycore/initializers.py.env.exampleEnvironment variables
Three are required for the endpoint to work. One is optional.
JIRA_BASE_URLhttps://nmbgmr.atlassian.netJIRA_EMAILJIRA_API_TOKENJIRA_DEFAULT_PROJECTBDMSSLACK_FEEDBACK_WEBHOOK_URLThese need to be added to the staging and production Secret Manager / environment config before deploying. The
SLACK_FEEDBACK_WEBHOOK_URLwill be provided outside of this PR.Auth
The endpoint uses
viewer_dependency— any logged-in Ocotillo user can submit feedback. Anonymous submissions are not accepted.