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

Omprakash Thamsetty
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.
September 22, 2022

Hi,

 

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

SELECT issue.id,issue.SUMMARY AS MLCS_SubTypes
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
DEPLOYMENT TYPE
SERVER
VERSION
8.20.8
TAGS
AUG Leaders

Atlassian Community Events