Lookup issue ? custom field with URL
Asked by Tiago Leite:

Hi!  

I'm trying to set up a JQL to search and compare a custom field with an URL with the same custom field from other tickets with an URL.  

Example:   

***"cf\[11300\]" = {{issue."cf\[11300\]"}}***   

cf\[11300\] is the field I want to compare and its name is "Chat Link\[Short text\]". I've tried on both formats, "cf\[11300\]" and "Chat Link\[Short text\]", but I always get the result:  

**Custom Smart Value JQL Search: "("cf\[11300\]" =) - Error in JQL Query: Expecting either a value, list or function but got ')'. You must surround ')' in quotation marks to use it as a value. (line 1, character 15)** The field after "=" is empty, looks like it can't get the info from the cf\[11300\] field. This field is always an URL, is that what's stopping the JQL from finding it? Or am I missing something?  

Thank you for your help!


Answers:
author: Stefan Salzl
body: Hi [@Tiago Leite](/t5/user/viewprofilepage/user-id/4883764)

for reasons of deeper analyze and overview: could you please provide a screenshot of your automation rule and the special components that contain the jql and/or smart value?

Furthermore: could you try to add a "audit log" action to see if the value of the used smart value can be read.

And:  
Did you also try a notation of smart value without "" --\> eg. with

* id ---\> {{issue.customfield_13300}} or
* name --\> {{issue.Chat Link\[Short text\]}}

Best  
Stefan

comments: author: Tiago Leite
body: Hi [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993) !  

Thank you for your reply!  

Here's a screenshot of the main core of this automation:   

![Screenshot 2022-06-22 16.12.07.png](https://community.atlassian.com/t5/image/serverpage/image-id/202975i5365BE235DFF4952/image-size/large?v=v2&px=999 "Screenshot 2022-06-22 16.12.07.png")  

I've tried ID and name without "", both still got the same error, it's blank after the "=".


author: Tiago Leite
body: I've also tried "=" and "IS", instead of "\~", but got the same outcome.


author: Stefan Salzl
body: Hi [@Tiago Leite](/t5/user/viewprofilepage/user-id/4883764) ,

What kind of type is your custom field? is it text or URL field?

Could you maybe share a screenshot of an issue with that field for having a better overview?

Best  
Stefan


author: Stefan Salzl
body: Hi [@Tiago Leite](/t5/user/viewprofilepage/user-id/4883764) ,

guess I could figure out the problem:  
I have no idea why the field type is added in jql search but as far as I could find out it?s no problem within the issue search but the smart value can?t resolve the \[Short Text\].

Following lookupIssue search worked on my side:

"Chat Link" \~ {{issue.Chat Link}} and id != {{issue.id}}

Please let me know if this was helpful.

Best  
Stefan


author: Tiago Leite
body: Hi [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993) ! Thank you, once again, for your reply!  

I can't share the field itself, since it has internal information, but it's an URL. Before that field, when the ticket is created, the field has "${ChatURL}", but that information is not shown on the ticket itself.  

When I tried the **"** **"Chat Link" \~ {{issue.Chat Link}} and id != {{issue.id}}"** I got the same outcome:  

*Custom Smart Value JQL Search: "("Chat Link" \~ and id != 5628902) AND (project in (12854))" - Error in JQL Query: Expecting either a value, list or function but got 'and'. You must surround 'and' in quotation marks to use it as a value. (line 1, character 17)*


author: Stefan Salzl
body: > Before that field, when the ticket is created, the field has "${ChatURL}"

What exactly do you mean with ?before"? when exactly does this action happen? Is the field/url set in a previous step of your rule? Could you please share the whole automation rule?

Furthermore could you please add a ?log action" action that only prints the value of the field to the audit log via smart value of the issue {{issue.Chat Link}} and check the result?

Best  
Stefan


author: Stefan Salzl
body: [@Tiago Leite](/t5/user/viewprofilepage/user-id/4883764)

could you share a screenshot of your entire automation rule as well as the detailed configuration/settings of your lookupissues action?

This would help to get a better understanding of the whole context in order to find the right solution.

Best  
Stefan


author: Stefan Salzl
body: Hi [@Tiago Leite](/t5/user/viewprofilepage/user-id/4883764)

any updates?

Best  
Stefan


Tags: custom-field

jql

lookup

url