gpt4 book ai didi

tfs - 查询包含特定类型附件的工作项

转载 作者:行者123 更新时间:2023-12-04 14:50:28 25 4
gpt4 key购买 nike

在我们的版本中,有时需要在我们的生产数据库上运行脚本。如果需要在数据库上运行脚本,则标准是将 .sql 文件附加到工作项。

有什么方法可以查询包含 .sql 文件附件的工作项吗?我不希望每次需要推送发布时都不必打开每个工作项来检查这些附件。

最佳答案

这是我通过查询 TfsWorkItemTracking 来做到的直接数据库。我认为 Fld10005在其他 TFS 实例上可能相同也可能不同。这些字段可以在 dbo.Fields 中找到。 table 。


with [project-nodes] (
ID,
[Name],
[Path],
[Depth])
as (
select
t.ID,
t.Name,
cast(t.Name as varchar(max)) as [Path],
0 as [Depth]
from dbo.TreeNodes t
where t.ID = 220
union all
select
c.ID,
c.Name,
cast(p.[Path] + '/' + c.Name as varchar(max)),
[Depth] + 1
from dbo.TreeNodes c
inner join [project-nodes] p
on c.ParentID = p.ID)
select
t.[Path] as [Area Path],
l.Title,
l.Fld10005 as [Resolved Date],
f.OriginalName
from dbo.WorkItemsLatest l
inner join [project-nodes] t
on l.AreaID = t.ID
inner join dbo.WorkItemFiles f
on l.ID = f.ID
where f.OriginalName like '%.sql'
and l.Fld10005 > '2010-05-21' -- ResolvedDate
order by
t.Name

关于tfs - 查询包含特定类型附件的工作项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3198073/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com