Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find user defined WIQL query #1891

Closed
jgelon opened this issue May 23, 2024 · 2 comments
Closed

Cannot find user defined WIQL query #1891

jgelon opened this issue May 23, 2024 · 2 comments

Comments

@jgelon
Copy link

jgelon commented May 23, 2024

Azure DevOps Extensions

Generate Release Notes (Node Cross Platform)

Platform

Azure DevOps Services

Azure DevOps Server (TFS) Version

No response

Extension Version

4.17.12

Describe the bug

When I fill in the wiqlSharedQueryName for a shared query the generator is not able to find that query;

Getting Work Items using user defined WIQL query '/Shared Queries/Release X'
Cannot find user defined WIQL query '/Shared Queries/Release X'

image

Repo Steps

  1. Set Pipeline steps
steps:
- task: XplatGenerateReleaseNotes@4
  inputs:
    outputfile: '$(Build.ArtifactStagingDirectory)/releasenotes.html'
    templateLocation: 'InLine'
    inlinetemplate: |
      <html>
      <h1>Features in release ({{queryWorkItems.length}})</h1>
      <ul>
      {{#forEach queryWorkItems}}
      <li>
          <strong>{{this.id}}</strong> <span>{{lookup this.fields 'System.WorkItemType'}}</span>: <span>{{lookup this.fields 'System.Title'}}</span><br />
          <span>{{lookup this.fields 'System.State'}}</span> | <span>{{lookup this.fields 'System.AreaPath'}}</span>
      </li>
      {{/forEach}}
      </ul>
      </html>
    dumpPayloadToConsole: false
    dumpPayloadToFile: True
    replaceFile: True
    getParentsAndChildren: false
    getAllParents: True
    getIndirectPullRequests: False
    stopOnError: False
    considerPartiallySuccessfulReleases: False
    checkForManuallyLinkedWI: False
    getPRDetails: false
    getTestedBy: false
    wiqlSharedQueryName: "Release X"
    
- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Build.ArtifactStagingDirectory)'
    publishLocation: 'pipeline'
  1. Run pipeline
  2. Check logs

Expected Behavior

Queries are loaded from shared query

Logging Information

No response

@rfennell
Copy link
Owner

Have a look at #1872 , the issue is usually permission related i.e. the build service does not by default have permissions to see the shared queries

@jgelon
Copy link
Author

jgelon commented Jun 6, 2024

That was indeed the case, may I advise to put this next to the documentation for wiqlSharedQueryName

@jgelon jgelon closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants