有人有trac报告可以获取所有没有里程碑的门票吗?

发布于 2024-10-02 13:05:03 字数 75 浏览 4 评论 0原文

我正在寻找 trac 报告的 TracQuery,以获取未列出指定里程碑的所有票证。您已经编写了此查询吗?如果是,您会分享吗?提前谢谢。

i'm looking for the TracQuery for the trac report to get all tickets without assigned milestone listed. have you already composed this query, if yes, would you share it? thx in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

墨落画卷 2024-10-09 13:05:03

像这样的事情应该可以做到,适应您的精确需求......

SELECT 
   id AS ticket,
   datetime(time,'unixepoch'),
   summary,
   status,
   priority,
   description AS _description
  FROM ticket t
  WHERE t.milestone is NULL AND t.status<>'closed'
  ORDER BY time desc, status, severity, summary

您的关键部分只是过滤为 NULL 的里程碑。

Something like this should do it, adapt to suit your precise needs....

SELECT 
   id AS ticket,
   datetime(time,'unixepoch'),
   summary,
   status,
   priority,
   description AS _description
  FROM ticket t
  WHERE t.milestone is NULL AND t.status<>'closed'
  ORDER BY time desc, status, severity, summary

The key part for you is simply to filter on the milestone being NULL.

ゞ记忆︶ㄣ 2024-10-09 13:05:03

我可以重现 Paul Dixon 的答案“未找到匹配项”,因此我自己尝试了:

SELECT 
   id AS ticket,
   time AS date,
   summary,
   status,
   priority,
   description AS _description
  FROM ticket t
  WHERE t.milestone not in (
    SELECT name
      FROM milestone
    )
    AND t.status<>'closed'
  ORDER BY time desc, status, severity, summary

注意:Trac 有一些“神奇”的结果表列名称。分配“日期”将自动执行时间戳整数到日期字符串的适当转换 - 甚至更好 - 也尊重 POSIX -秒的当前内部 Trac 时间戳格式(自 Trac 0.12 起)。在这方面,上面的 SQL 语句甚至是我所知道的最可移植的解决方案。

I could reproduce the 'No matches found' for the answer by Paul Dixon, so I tried it on my own:

SELECT 
   id AS ticket,
   time AS date,
   summary,
   status,
   priority,
   description AS _description
  FROM ticket t
  WHERE t.milestone not in (
    SELECT name
      FROM milestone
    )
    AND t.status<>'closed'
  ORDER BY time desc, status, severity, summary

Note: Trac has some "magic" result table column names. Assigning 'date' will do the appropriate conversation of time stamp integer to date string automagically - even better - respecting the current internal Trac time stamp format of POSIX micro-seconds (since Trac 0.12) too. In this respect the SQL statement above is even the most portable solution I'm aware of.

茶花眉 2024-10-09 13:05:03

使用 Trac 的查询语言而不是原始 SQL,这非常简单。在 wiki 页面上,您可以使用 query:milestone= 创建一个链接,查询所有未分配里程碑的工单。调用宏 [[TicketQuery(milestone=)]] 将匹配票证列表插入 wiki 页面。

要在“自定义查询”页面上执行相同的操作,请删除所有搜索条件并添加单个条件“里程碑”“是”并将第三个字段留空。

This is quite simple using Trac's query language instead of raw SQL. On a wiki page, you can use query:milestone= to create a link to a query of all tickets without a milestone assigned. Invoke the macro [[TicketQuery(milestone=)]] to insert the list of matching tickets into the wiki page.

To do the same thing on the "Custom Query" page, remove all search criteria and add a single criteria of "milestone" "is" and leave the third field blank.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文