How to get @mentioned Items using WIQL - DevOps Query

Soumen Dey 1 Reputation point
2022-08-04T06:39:18.427+00:00

I want to get all workitem/names where I have been mentioned using @mention
Am using WIQL query (not REST API)

Please suggest.

Thanks,
Soumen Dey

Community Center | Not monitored

1 answer

Sort by: Most helpful
  1. Coby 0 Reputation points
    2023-01-11T21:25:44.9+00:00

    Try the below:

    SELECT
        [System.Id],
        [System.WorkItemType],
        [System.Title],
        [System.AssignedTo],
        [System.State],
        [System.AreaPath],
        [System.CommentCount]
    FROM workitems
    WHERE
        [System.TeamProject] = @project
        AND [System.Id] IN (@recentMentions)
        AND NOT [System.State] IN ('Closed', 'Inactive', 'Completed')
    ORDER BY [System.ChangedDate] DESC
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.