Jira discovery merge: show jira stats for non finished report rows#19
Open
PavelLoparev wants to merge 10 commits intomainfrom
Open
Jira discovery merge: show jira stats for non finished report rows#19PavelLoparev wants to merge 10 commits intomainfrom
PavelLoparev wants to merge 10 commits intomainfrom
Conversation
…y with LLM analysis
PavelLoparev
commented
Mar 25, 2026
| // 1. All Jira issues (compact) | ||
| const [jiraRows] = await db.execute( | ||
| `SELECT issue_key, project_key, issue_type, github_login, LEFT(summary, 80) as summary | ||
| `SELECT issue_key, project_key, issue_type, github_login, SUBSTR(summary, 1, 80) as summary |
Contributor
Author
There was a problem hiding this comment.
sqlite vs mysql compatibility
PavelLoparev
commented
Mar 25, 2026
|
|
||
| useEffect(() => { | ||
| fetch('/api/llm-config').then(r => r.json()).then(setConfig).catch(() => {}).finally(() => setLoading(false)); | ||
| fetch('/api/app-config').then(r => r.json()).then(setConfig).catch(() => {}).finally(() => setLoading(false)); |
Contributor
Author
There was a problem hiding this comment.
I forgot to rename this route last time when I refactored llm config -> app config
PavelLoparev
commented
Mar 25, 2026
Comment on lines
+300
to
+306
| // If LLM finished first and already wrote stats with 0, patch the count now | ||
| if (completedMembers.has(login)) { | ||
| db.execute( | ||
| `UPDATE developer_stats SET total_jira_issues = ? WHERE report_id = ? AND github_login = ?`, | ||
| [issues.length, reportId, login], | ||
| ).catch((err) => log(`DB WARN updating jira count for @${login}: ${err}`)); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Avoid race condition
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.
Summary
resolveJiraUserto acceptemails: string[]directly (extracted from in-memory commits) instead of querying thecommit_analysesDB table — removing the LLM dependency entirely.checkMemberCompletenow reads fromjiraIssueCountByLoginif Jira finished first; if LLM finished first, the Jira IIFE patches thedeveloper_statsrow with a targetedUPDATEonce it completes.page.tsxandreport/[id]/org/page.tsxnow show the Jira column wheneverJIRA_ENABLED=true, not only after at least one developer has a non-zerototal_jira_issuescount.pLimit(default 3, configurable viaJIRA_CONCURRENCYenv var) to avoid flooding the Jira API on large orgs.storyPointsFieldsfrom app config was not being forwarded tosearchDoneIssues— storyPoints was always null. Fixed.LEFT(str, n)in the project-insights query replaced withSUBSTR(str, 1, n)which works in both SQLite and MySQL./api/llm-config→/api/app-configto match the service rename.Test plan
JIRA_ENABLED=trueand verify Jira issue counts appear progressively during the run, not only at completionstoryPointsare populated for issues whereJIRA_STORY_POINTS_FIELDSis configuredno such function: LEFT errorson the/api/project-insights endpoint/api/app-configresponds correctly (settings page load, Jira column visibility on page mount)