Feature/expose devlake project extrajql variable - #9025
Closed
yotams123 wants to merge 2 commits into
Closed
Conversation
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>
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.
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.