I am trying to do a rest call to jira and the jql is as below.
JavaScript
x
2
1
jql="Project" = "Test: Dev int: commons & Uig mat"
2
so when i do the rest call to jira, it is replacing the jql as below:
JavaScript
1
2
1
jql="Project" = "Test: Dev int: commons ',' Uig mat"
2
so, the & is being replaced with “,” which is throwing an error as that project is not available in jira
I tried replacing the “,” with &, it is again replacing it with “,” while it is run.
JavaScript
1
14
14
1
import requests
2
3
url = "https://jira.com/login/rest/api/2/search"
4
querystring = {jql='working Project' = 'Test: Dev int: commons & Uig mat'}
5
6
7
headers = {
8
'content-type': "application/json",
9
}
10
11
response = requests.request("GET", url, headers=headers, params=querystring)
12
13
print(response.text)
14
I want to pass in exact string to jira to process and do the query
Advertisement
Answer
I just replaced & with %26 and it worked just fine