开发者

Trac: report execution failed: Dynamic variable '$MYVAR' not defined

I'm trying to develop a custom report for trac using SQL. On one of my trac instaces, if I specify I dynamic variable like $MYVAR, it will show a little form on the report where I can fill in that value. On other instances, I get an error that says "Report execution failed: Dynamic variable '$MYVAR' not defined.". Why am I getting this error?

The servers where this works are well established trac instances with a MySQL db. The server with the error is a fresh install running SQLite.

The sample query I'm running is:

SELECT 
  t.id AS ticket, t.version, t.time AS created, test_four.value as 'My Select'
FROM 
  ticket t
LEFT OUTER JOIN ticket_custom test_four ON
  (t.id = test_four.ticket AND test_four.name = 'test_four')
WHERE
  (test_four.value like '$MYVAR' or (test_four.value is null 开发者_如何转开发and '$MYVAR' = '%'))

with

[ticket-custom]
test_four = select
test_four.label = My selectbox
test_four.options = |one|two|third option|four
test_four.value =

as the custom field config. Thanks for the help.


As it turns out, the Argument box was introduced in trac 0.12, and I was running .11 in my new instance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜