Can anyone tell, why the following query is not working?

swati sneha August 5, 2012

"select parent_name from cwd_membership where child_name = {reporter} and parent_name in (select group_name from RESPONSIBLE_TEAM where Team_Category != 'SME');" I am using the pluging "Database Custom Field" plugin and used above query. If i am using any hard coded value in place of {reporter}, then only its working fine. Please sugest any solution.

3 answers

1 accepted

0 votes
Answer accepted
Alexandru_Iacob
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.
August 26, 2012

You should upgrade to the latest version of databasecf for Jira 4.3, that is 1.1.3, in which reporter works correctly as query parameter on all screens.

0 votes
bede August 5, 2012

not sure if it applies to your SQL, but in the property file the field value usually needs to be preceded by '$'

e.g.

sql.query=select case from simple_view where domain = '${_customfield_10943}' and area = '${_customfield_10944}'

0 votes
Alexandru_Iacob
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.
August 5, 2012

Hi,

What version of Jira and databasecf plugin are you using? On which screen are you testing the custom field (edit issue, create issue, transition)?

swati sneha August 6, 2012

I am using jira-4.3 version and databasecf-1.0.3 version. i am trying to do that on create and edit issue screen.

Alexandru_Iacob
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.
August 7, 2012

On edit issue the query should work when the page is loaded. The database custom field should show the correct values. It doesn't correctly update values when selecting a reporter from the autocomplete suggestions list, but it updates ok when selecting the reporter from the user picker popup or when entering manually the entire username for the reporter. You can use this alternative until a fix will be available.

Is the selection from autocomplete suggestions causing you the problem or the database custom field doesn't show the right values when entering edit issue? If second is the case, make sure the value stored in database for the column child_name matches exactly the reporter field value.

If that is not the problem, please add a request here http://bugs.kepler-rominfo.com , giving more details, such as log entries and screenshots.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events