jira-database-values-plugin-10290.properties
ファイルは次のとおりです。
# The database connection parameters
database.driver=net.sourceforge.jtds.jdbc.Driver
database.user=...
database.password=...
database.connection.url=jdbc:jtds:sqlserver://localhost:1433/jiradb
# Cache Timeout (= 15 minutes by default). The actual db is queried only once and then the results are kept in the cache for the given timeout. Uncomment the line below to change it.
#cache.timeout=900000
# The SQL Query that will be executed on the database
sql.query=select start_date from date_table where personel like (select reporter from jiraissue where pkey like '${jira.project.key}' )
# The column number (starting from 0) that contains the primary key of the returned data.
primarykey.column.number=0
# The pattern that should be used to render the data in view mode. Use {column_number} as placeholders. You can use HTML, but make sure you close your tags properly!
rendering.viewpattern={0}
# The pattern that should be used to render the data in edit mode. Use {column_number} as placeholders.
rendering.editpattern={0}
# The pattern that should be used to render the data in searcher. Use {column_number} as placeholders.
rendering.searchpattern={0}
以下のように特定のプロジェクト キー (たとえば JRA-621 ) を指定すると、正常に動作します。
sql.query=select start_date from date_table where personel like (select reporter from jiraissue where pkey like 'JRA-621' )
しかし、以下のように現在のプロジェクトのキー値を呼び出したい場合、機能しません:(
sql.query=select start_date from date_table where personel like (select reporter from jiraissue where pkey like '${jira.project.key}' )
私の表現で何が間違っていますか?
id personel start_date end_date
== ======== ========== ========
0 u.name 2012-05-05 NULL
1 u.name2 2012-04-02 NULL
...
ありがとう