Skip to content

Commit

Permalink
Merge pull request #133 from imonteroperez/escape-parameter-char
Browse files Browse the repository at this point in the history
Add ? as supported char for queries against JIRA
  • Loading branch information
imonteroperez authored Apr 4, 2023
2 parents 2377289 + 1f6266e commit 749342e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ private static SearchResult getSearchResult(String jql) {
* Based on https://jira.atlassian.com/browse/JRASERVER-25092, currently supported:
* + - & | ~ *
*
* Also supported ? although JRSERVER-25092 defines the opposite
*
* Unsupported:
* ! ( ) { } ^ ? \ /
* ! ( ) { } ^ \ /
*
* Provides special support for parameterized tests by ignoring the parameter in [ ]
*
Expand All @@ -290,7 +292,8 @@ static String escapeJQL(String jql) {
.replace("&", "\\\\&")
.replace("\\|", "\\\\|")
.replace("~", "\\\\~")
.replace("\\*", "\\\\*");
.replace("\\*", "\\\\*")
.replace("?", "\\\\?"); // Although ? char is still not supported based on JRASERVER-25092

if (result.contains("[")) {
result = result.substring(0, result.lastIndexOf("[")); // let's remove the parameter part
Expand Down

0 comments on commit 749342e

Please sign in to comment.