Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Advanced database custom field: How to get issue type and project key into SQL script



I am using the power database field plugin for some db custom fields. This plugin team is now deprecating the old field type so migrating to advanced row field. In this process I found that I need an issue:IssueType and issue:projectKey or screen:issueType and Screen:ProjectKey from the create/edit screen to run my sql script and show the dynamic results. 


How can I get the script parameter into my SQL script mentioned below

FROM JiraschemaD.jiraissue issue
INNER JOIN [jiradbD].[jiraschemaD].[issuetype] it ON issue.issuetype = it.ID
INNER JOIN [jiradbD].[jiraschemaD].[project_key] pk ON issue.PROJECT = pk.PROJECT_ID
WHERE it.pname = 'TASK'
and pk.PROJECT_KEY = 'PMP'
order by issue.summary

Line 5 and 6 need to pass inputs. 


Do I need to add script parameter in SEARCH as shown in below screenshot.

advaced subtype.PNG 

0 answers

Suggest an answer

Log in or Sign up to answer