GitLab Jira issues - Issues page wont load if Project Key is a JQL Reserved Keyword
Summary
Now the Jira issue page won't load and shows a generic error: Jira issues - Consider including Jira response ... (#426034 - closed)
An error occurred while requesting data from Jira. Check your Jira integration configuration and try again.
Rails just shows Bad Request
:
"json.exception.class.keyword": [
"JIRA::HTTPError"
],
"json.exception.message": [
"Bad Request"
But if we capture the request response, we see something like this
{"errorMessages":["Error in the JQL Query: 'INT' is a reserved JQL word. You must surround it in quotation marks to use it in a query. (line 1, character 11)"],"errors":{}}
We can find the list of reserved JQL word at Atlassian page:
"abort", "access", "add", "after", "alias", "all", "alter", "and", "any", "as", "asc", "audit", "avg", "before", "begin", "between", "boolean", "break", "by", "byte", "catch", "cf", "char", "character", "check", "checkpoint", "collate", "collation", "column", "commit", "connect", "continue", "count", "create", "current", "date", "decimal", "declare", "decrement", "default", "defaults", "define", "delete", "delimiter", "desc", "difference", "distinct", "divide", "do", "double", "drop", "else", "empty", "encoding", "end", "equals", "escape", "exclusive", "exec", "execute", "exists", "explain", "false", "fetch", "file", "field", "first", "float", "for", "from", "function", "go", "goto", "grant", "greater", "group", "having", "identified", "if", "immediate", "in", "increment", "index", "initial", "inner", "inout", "input", "insert", "int", "integer", "intersect", "intersection", "into", "is", "isempty", "isnull", "join", "last", "left", "less", "like", "limit", "lock", "long", "max", "min", "minus", "mode", "modify", "modulo", "more", "multiply", "next", "noaudit", "not", "notin", "nowait", "null", "number", "object", "of", "on", "option", "or", "order", "outer", "output", "power", "previous", "prior", "privileges", "public", "raise", "raw", "remainder", "rename", "resource", "return", "returns", "revoke", "right", "row", "rowid", "rownum", "rows", "select", "session", "set", "share", "size", "sqrt", "start", "strict", "string", "subtract", "sum", "synonym", "table", "then", "to", "trans", "transaction", "trigger", "true", "uid", "union", "unique", "update", "user", "validate", "values", "view", "when", "whenever", "where", "while", "with"
Example tickets:
Steps to reproduce
- Create a project on Jira with the JQL reserved keyword as project key - example
INT
- Integrate GitLab project with Jira and specify the project key
- Try loading Jira Issue page on GitLab Project
- See generic error
Example Project
N/A
What is the current bug behavior?
The Jira issue list would not load but other parts of the integration works fine.
What is the expected correct behavior?
GitLab should be able to handle project key with JQL reserved keyword
Possible fixes
Add double quote or escape character to the project key when using JQL to connect to Jira
Note to Assignee
Please remove this issue from the troubleshooting documentation once fixed: Add known bug to troubleshooting docs (!132606 - merged)
Edited by Emily Chang (OOO, back 22nd July)