You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm using this Python module to run searches on Jira tickets (right now, just the ticket summary field) and I'm running into a problem with the use of dashes.
I know that dashes are reserved characters and have to be doubly escaped (\\-) in regular JQL queries; that works just fine when prototyping the query I'm trying to use with the jira module. But when I do the same thing in Python, I get this (partially redacted):
>>> jira.search_issues("project=MANHATTAN and summary ~ 'findings \\-'")
... Traceback elided...
response text = {"errorMessages":["Error in the JQL Query: '\\-' is an illegal JQL escape sequence. The valid escape sequences are \\', \\\", \\t, \\n, \\r, \\\\, '\\ ' and \\uXXXX. (line 1, character 34)"],"errors":{}}
I've tried the same thing with a single backslash-escape and get pretty much the same thing:
>>> jira.search_issues("project=MANHATTAN and summary ~ 'findings \-'")
... Traceback elided...
response text = {"errorMessages":["Error in the JQL Query: '\\-' is an illegal JQL escape sequence. The valid escape sequences are \\', \\\", \\t, \\n, \\r, \\\\, '\\ ' and \\uXXXX. (line 1, character 34)"],"errors":{}}
Trying without a backslash escape at all fails just as one would expect:
>>> jira.search_issues("project=MANHATTAN and summary ~ 'findings -'")
... Traceback elided...
response text = {"errorMessages":["Unable to parse the text 'findings -' for field 'summary'."],"warningMessages":[]}
Is this a bug in the module? An option that I can provide to .search_issues()? Or is there a workaround of some kind?
Is there an existing issue for this?
I have searched the existing issues
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
1001.0.0-SNAPSHOT (I don't have admin access so all I can do is view the source code of our Jira frontpage)
jira-python version
3.8.0
Python Interpreter version
3.12.6
Which operating systems have you used?
Linux
macOS
Windows
Reproduction steps
# 1. Given a Jira client instance# Our Jira instance's URL, my username, and API key are redacted.jira=JIRA(server=tickets, basic_auth=(username, api_key))
myself=jira.myself()
# This is just to make sure that authentication worked. It does.ifnotmyself:
print("Authentication to %s failed. ABENDing."%tickets)
sys.exit(1)
# 2. I run a search on our Jira tickets. A very simple one for now. Slightly redacted.jira.search_issues("project=MANHATTAN and summary ~ 'findings \\-'")
Bug summary
Hi. I'm using this Python module to run searches on Jira tickets (right now, just the ticket summary field) and I'm running into a problem with the use of dashes.
I know that dashes are reserved characters and have to be doubly escaped (
\\-
) in regular JQL queries; that works just fine when prototyping the query I'm trying to use with the jira module. But when I do the same thing in Python, I get this (partially redacted):I've tried the same thing with a single backslash-escape and get pretty much the same thing:
Trying without a backslash escape at all fails just as one would expect:
Is this a bug in the module? An option that I can provide to .search_issues()? Or is there a workaround of some kind?
Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
1001.0.0-SNAPSHOT (I don't have admin access so all I can do is view the source code of our Jira frontpage)
jira-python version
3.8.0
Python Interpreter version
3.12.6
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
At least a partial list of Jira tickets whose summaries contain the string "findings -":
Or an empty list if there weren't any.
Additional Context
No response
The text was updated successfully, but these errors were encountered: