我正在尝试在JQL中使用变量
client = 'Newbie'
query = "Managed Services On-boarding " + client
headers = {
'Content-Type': 'application/json',
}
params = (
('jql', 'project="Managed Services" AND summary~'"'+query+'"' AND issuetype="Task" AND status!="DONE"'),
)
上方给出的结果为零
但是如果我进行硬编码查询,我会得到结果
params = (
('jql', 'project="Managed Services" AND summary~"Managed Services On-boarding Newbie" AND issuetype="Task" AND status!="DONE"'),
)
有什么方法可以在JQL中使用变量?
答案 0 :(得分:1)
查询变量周围的引号有误。 像这样尝试:
client = 'Newbie'
query = "Managed Services On-boarding " + client
headers = {
'Content-Type': 'application/json',
}
params = (
('jql', 'project="Managed Services" AND summary~"'+query+'" AND issuetype="Task" AND status!="DONE"'),
)