Unable to proper searchby JQL Text Field in Advanced Branching
Asked by Arkadiusz Inglot:

Hi

I have an ONE existing issue with different set of fields.

One of them is:  
**Service Tag (serial number)**which is Short text field.

While providing below JQL in Issue Navigator

**project = 'ABC' and issuetype='Asset' and 'Service Tag (serial number)' \~ '6789G2'**

I receive proper result. There is only 1 task displayed.

However when Iam trying to make automation rule with advanced branching by JQL inside this project ABC using the same JQL, I receive **"No related issues could be found."**

Tried:

* **project = 'ABC' and issuetype='Asset' and 'Service Tag (serial number)' \~ '6789G2'**
* **project = 'ABC' and issuetype='Asset' and 'Service Tag (serial number)' \~ "6789G2"**
* **project = 'ABC' and issuetype='Asset' and 'Service Tag (serial number)' \~ \\"6789G2\\"**
* **project = "ABC" and issuetype='Asset' and 'Service Tag (serial number)' \~ "\\"6789G2\\""**
* **project = 'ABC' and issuetype='Asset' and 'Service Tag (serial number)' \~ \`6789G2\`**

All aboves return the same single task in Issue Navigator. But in Advanced branching - it doesnt work. Tried with multiple fake SN's as well as with variable from manual trigger prompt like {{userInputs.serial}} etc. No result.

Anychance I can see how this JQL in Advanced branching is processed?

I've created variable called {{jqlQuery}} and inserted into my JQL, then Action log -\> {{jqlQuery}} but all looks fine - except the Branching is not working.

Iam unable to use another type of field.

Iam unable to use proper "Asset management in JSM".


Answers:
author: Arkadiusz Inglot
body: Found source of issue:

After forcing error on purpose Branching displays the JQL which looks like this:

**ABC-617:** "((project = ABC and issuetype\~'Asset' and 'Service Tag (serial number)' \~ \\"Z6789X276\\") AND **(key != ABC-617))** AND (project in (10045))" - The operator '\~' is not supported by the 'issuetype' field.

Dont mind the IssueType \~ operator - this was forced on purpose to display all processed JQL. So I see that Branching adds:

**(key != ABC-617)).**

Which is a source of issue, because IAM RUNNING THIS AUTOMATION FROM CURRENT TASK Whcih is ABC-617.

Can I get rid of it or do I need to make bypass with some IFs (if current task is having the value in field proceed without Branching).  

I'd like to be able to run this automation rule no metter from where. Even from the task which will be modified and is having the proper value.

comments: author: Boldizs?r Vermes
body: [@Arkadiusz Inglot](/t5/user/viewprofilepage/user-id/5254835), have you tried lookupissues and use its result in the branching criteria?


author: Darryl Lee
body: I think if you are limiting the rule to your project you can omit **project=ABC**. Not sure if that's root cause, but something to at least try.


author: Arkadiusz Inglot
body: In addition:

**This works in Navigator \& Branching:**

project = ABC and issuetype='Asset' and 'Service Tag (serial number)' \~ \\"9283MGL5\\"

**This works only in Navigator (not in Branching):**

project = ABC and issuetype='Asset' and 'Service Tag (serial number)' \~ \\"6789G2\\"

**No spaces, no white chars, no any special chars.**

**Why?**


Tags: cloud