Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi everybody,
I'm using Automation in Jira Data Center with rule triggered by "Issue linked".
I've created an If-block with the following JQL:
{{issue.project}} not in (STCS, ITGOV) or {{issue.issuetype}} != Epic or {{destinationIssue.project}} not in (STCS, ITGOV) or {{destinationIssue.issuetype}} != Epic or {{destinationIssue.project}} = {{issue.project}}
I'm getting an JQL error saying:
Fehler in der JQL-Abfrage: Das Zeichen "{" ist ein reserviertes JQL-Zeichen. Sie müssen es stattdessen in eine Zeichenfolge einfügen oder das Escapezeichen "\u007b" verwenden. (Zeile 1, Zeichen 41)
Translated in English:
JQL query error: The "{" character is a reserved JQL character. You'll need to put it in a string instead, or use the "{" escape. (line 1, character 41)
What am I doing wrong and how should my JQL look like?
Many thanks for your help and best regards,
Gisela Lassahn
If I understand your question, the JQL statement you show is not valid.
JQL statements have this syntax: some_issue_field OPERATOR some_value
For example: project IN (ABC, DEF)
Instead you are trying this: some_value OPERATOR some_other_value
For example: ABC IN (DEF)
And so there are no issue fields referenced, leading to the syntax errors. (JQL is not a SQL, and so does not support those types of logical / comparison operations of data.)
Without knowing the specifics of the problem you are trying to solve, I believe you could either use Issue Conditions or Advanced Compare Conditions, testing the smart values with logical operators.
Kind regards,
Bill
Hi Gisela,
Try using just:
issuetype != Epic
it’s just JQL so you shouldn’t need the smart value there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk ,
I could do this for the trigger issue, but not for the destination issue, or am I wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correct. But the error is for character 41, which is before that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please try the below JQL and check?
{{issue.project}} not in ("STCS", "ITGOV") or {{issue.issuetype}} != "Epic" or {{destinationIssue.project}} not in ("STCS", "ITGOV") or {{destinationIssue.issuetype}} != "Epic" or {{destinationIssue.project}} = "{{issue.project}}"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manoj Gangwar ,
I've tried your JQL but I'm still getting exactly the same error message.
In the message details I can see that my JQL is resolved to:
(key IN (ITGOV-66) AND (SmartProjectBean{source=Project{self='https://jira....
The "{" after "SmartProjectBean" is on position 41 and seems to cause the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found workaround.
No I have two Smart Value Variables:
Now I can work with these variables.
Many thanks to you for your time!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I've got another problem.
My JQL now is:
"{{ProjectShortcut}}" not in ("STCS", "ITGOV") or "{{issue.issuetype.name}}" != "Epic" or "{{DestinationProjectShortcut}}" not in ("STCS", "ITGOV") or "{{destinationIssue.issuetype.name}}" != "Epic" or "{{DestinationProjectShortcut}}" = "{{ProjectShortcut}}"
The error message is:
... error running JQL: "(key IN (ITGOV-66) AND ("ITGOV" not in ("STCS", "ITGOV") or "Epic" != "Epic" or "UTK" not in ("STCS", "ITGOV") or "Story" != "Epic" or "UTK" = "ITGOV"))" - Feld 'ITGOV' existiert nicht., Feld 'Epic' existiert nicht., Feld 'UTK' existiert nicht., Feld 'Story' existiert nicht.
Field 'ITGOV' does not exist., Field 'Epic' does not exist., Field 'UTK' does not exist., Field 'Story' does not exist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I cannot create combinations of Issue Field Conditions connected with "OR" in an If-block (only with "AND"), I'm using an If-else-structure with else-if branches and Issue Field Conditions now and do the things in the else-branch instead of the if-branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.