Skip to content

Feature/expose devlake project extrajql variable - #9025

Closed
yotams123 wants to merge 2 commits into
apache:mainfrom
yotams123:feature/expose-devlake-project-extrajql-variable
Closed

Feature/expose devlake project extrajql variable#9025
yotams123 wants to merge 2 commits into
apache:mainfrom
yotams123:feature/expose-devlake-project-extrajql-variable

Conversation

@yotams123

Copy link
Copy Markdown

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

What does this PR do?

Does this close any open issues?

Closes xx

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.

yotams123 and others added 2 commits July 30, 2026 22:52
Users often want to filter a shared Jira board per Devlake project using the devlake project name.  The ExtraJQL field supports Go text/templates, but only BoardId and BoardName are available.

Look up the Devlake project name from the project_mapping table at task setup time and expose it as {{.ProjectName}} in ExtraJQL templates.

Example scope config ExtraJQL:
component = {{.ProjectName}}
…ous reverse lookup

The original ProjectName resolution reverse-looked-up project_mapping by
board, which can't disambiguate when the same board is attached to more
than one Devlake project (project_mapping's PK is project_name+table+
row_id) -- exactly the scenario this feature is meant to support. Instead,
GeneratePlanJsonV200 now injects "projectName" generically into every
data-source task's options at blueprint-plan-build time, the one place in
the framework where the running project and its scopes are known together
unambiguously. Jira's PrepareTaskData just reads it back, removing the
project_mapping/crossdomain/didgen lookup entirely.

Also: gofmt the JqlTemplateData struct/literal, wire the previously-unused
projectName param in Test_renderExtraJQL's test helper and add coverage
for {{.ProjectName}}, add TestMakePlanV200InjectsProjectNameIntoDataSourceTaskOptions,
and document {{.ProjectName}} in the config-ui ExtraJQL tooltip.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yotams123 yotams123 closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant