Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to pass field value into the SQL query of another field (Jira_database_value_plugin.properties)?

soumia March 27, 2015

Hi,

I am using the Database Value Plugin to populate two custom fields from an external SQL Server database.

For the first field field1 (sql.query=select name from table1) it is working properly.

But for the field2, I need to pass the selected value of field1 to the SQL query of the field2:

sql.query=select version from table1 where name = {field1.value}

This syntax is not working. Any help on this?

Thank you,

 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2015

Hi soumia!

I do not know syntax for the Database Value Plugin but I think you can use subselect, putting to the subselect query you use to get field1:

sql.query=select version from table1 where name = (select field1 from table2 where...)


TAGS
AUG Leaders

Atlassian Community Events