•  
     
    story #39330 Choose on which tracker I perform my query
Summary
Empty
Choose on which tracker I perform my query
Empty

Example: FROM @project.name = 'gpig' and @tracker.name = 'sla' WHERE @status = OPEN() will return all open artifacts of SLA tracker of gpig project.

  • @project.name = 'gpig' and @tracker.name = 'sla': one tracker in one project
  • @project.name = 'gpig': all trackers of one project
  • @project.name IN ('gpig', 'red', 'foo') and @tracker.name = 'sla': sla tracker of several projects.
  • @project.name = 'gpig' and @tracker.name IN ('sla', 'request'): sla or request tracker in gpig project
  • @project.name IN ('gpig', 'red', 'foo') and @tracker.name IN ('sla', 'request'): sla and request tracker in gpig, red and foo projects
  • @project.category = 'helpdesk': all trackers of all projects withhelpdesk category
  • @project.category = 'topic::power' : all trackers of all projects withtopic -> power category (topic is parent of power)
  • @project = 'self'

Rules:

  • Supported selector:
    • @project.name = 'string' : select one project based on it's short name. It's an exact match.
    • @project.name IN (string, ...): select projects based on their short name. It's an exact match.
    • @project.category = 'string': select projects that match given project category. It's an exact match.
    • @project.category IN (string, ...): select projects based on their project categories. It's an exact match.
    • @project = 'self': select current project. Works only in the context of a project dashboard. In the context of personal dashboard, this leads to an error.
    • @project = 'aggregated': select all aggregated projects (program management)
      • works only in the context of a project dashboard of a project that uses Program Management,
      • on the context of a project dashboard of a project that doesn't use Program Management, this leads to an error,
      • in the context of personal dashboard, this leads to an error.
    • @tracker.name = 'string': select one tracker inside selection of projects (implies @project = 'self').
    • @tracker.name IN (string, ...): select all trackers based on their short name inside selection of projects (implies @project = 'self').
  • It's possible to have zero or one @project rule per FROM:
    • OK: @project.name = 'gpig'
    • OK: @project.category = 'topic::power'
    • NOK: @project.category = 'helpdesk' AND @project.name = 'foo'
  • It's possible to have zero or one tracker rule per FROM:
    • OK: @tracker.name = 'sla'
    • NOK: @tracker.name = 'sla' AND @tracker.name = 'request'
  • It's possible to use either @tracker AND @project as well as @project AND @tracker with the same result
  • OR is not supported

By default there is no limit in the number of trackers involved in a given query, however, there is a kill-switch config-key that allows to define a maximum number of trackers in case of emergency.

When some projects or trackers cannot be accessed due to permissions, they are silently ignored. If no trackers are readable due to permissions, the result is a "no artifact found".

When no project or tracker match the query (eg typo), the result is "no artifact found".

Empty
Empty
Status
Cross tracker search
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?

Technical task splitting for FROM

  • Grammar
  • Config-key maximum tracker retrieved by FROM (default to -1 for no limit)
  • Begin with @project = 'self' then @project.category (= and IN)
  • Continue on @tracker.name (= and IN)
  • Finish @project.name and @project = 'aggregated'
  • Add key in json API return to tell number of tracker and project hit by FROM
  • Autocompletion @*
Details
#39330
Kevin Traini (ktraini)
2024-10-17 10:15
2024-08-19 12:21
39913

References
Referencing story #39330

Git commit

tuleap/tuleap/stable

feat: Add grammar for tql FROM f561e944c9
feat: Add base structure for FROM validation 6483350fc4
chore: rename getArtifactsMatchingExpertQueryWithSelect and getArtifactsMatchingExpertQuery 4681e2b734
feat: Begin validation of XTS FROM 28760e2ad8
chore: Avoid executing useless query 6c703d13e6
refacto: Rename CrossTrackerReport to CrossTrackerDefaultReport 2d3e98bd48
refacto: Rename CrossTrackerReportRepresentaion to CrossTrackerDefaultReportRepresentation c01c30202a
feat: Check @project = 'self' ad2eb11340
Have a dedicated class to represent an expert report c43dc5c880
feat: Check @tracker.name 7813595f83
feat: Check @project.category 652a14a75b
feat: Build FROM query to get trackers ids 906739ff6b
feat: Build @project.category SQL query 3c61a1fb14
Be able to switch between default and expert mode in cross tracker 31231ac381
feat: Build @tracker.name SQL query b6e1dd50be
feat: Check @project.name b5caa5d9aa
feat: Remove tracker selector dropdown when the XTS widget is in 1a800eac1c
feat: Build @project.name SQL query b1d70e3a46
fix: Add missing DISTINCT in count query 83be027e1c
fix: report update can fail when using @project.category fd30c673a3
feat: Check @project = 'aggregated' a137b2b563
fix: CrossTrackerReportDao should not save trackers when expert 5c649ae14c
feat: Build @project='aggregated' SQL query efb482e2f8
fix: @project='aggregated' only in program project 4c46ca1326
feat: Config key to limit quantity of select c89f41c27b
refacto: Use CrossTrackerReportDao::searchCrossTrackerWidgetByCrossTrackerReportId 23d88fb38b
chore: Add instrumentation for XTS query 64c6737125
feat: Add highlight for SELECT FROM WHERE bd568ea56a
feat: Do not display empty state message if XTS is expert fd970718d5
fix: @project='aggregated' should not get program project 204e7e14d9

Follow-ups

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Status changed from On going to Done
  • Technical informations
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes