Hi everyone! Hope you're fine
I'm trying to perform some report automations based on my Jira Issues and I would like to perform an Issue search via API REST whithin a time frame (I've already achieved this) and ONLY if a certain customfield name value contains a text
I know that this works:
"https://xxxxx.atlassian.net/rest/api/2/search?jql=created >= START_DATE_VAR AND created <= END_DATE_VAR AND "...
So I would like to add after the last AND something like
"CustomFieldXX".name ~ "TEXT"
Hopefully you could give me a hand
Thank you so much for your time!
Best regards,
I found the answer!
If anyone interested, is this:
Since my customfield was an Asset Object, I did it using AQL mixed with JQL
This:
"CustomFieldXX" in aqlFunction('name LIKE TEXT')
Hope this could be useful for you
Hi @Ian Carlos
Instead of
"CustomFieldXX".name
Can you try with
customfield_xxxxx ~ "TEXT"
Where xxxxx is the custom field id of the associated custom field
Basically, your API call would be like
"https://xxxxx.atlassian.net/rest/api/2/search?jql=created >= START_DATE_VAR AND created <= END_DATE_VAR AND customfield_xxxxx ~ 'TEXT'"
Hope this helps.
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vamsi
Thanks a lot for your fast reply
I tried what you say and it gives me the following error:
The operator '~' is not supported by the 'CUSTOMFIELDXX' field
Do you have any idea of what to do?
Thank you so much 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.
Hi @Ian Carlos
What is the type of the custom field 'customfield_xxxxx'?
The "~
" operator is used to search for issues where the value of the specified field matches the specified value (either an exact match or a "fuzzy" match — see examples below). For use with text fields only, i.e.:
Please refer to this article for more help:
https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/
Hope this helps.
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vamsi, again, thanks for your fast reply and sorry for my late one (I was taking lunch)
mmm, the customfield is related to an Asset, that's why I thought there it could be a "object.name" or something like that
I don't know how to do it with AQL and how to mix this with JQL
Sorry
And thanks a lot for the documentation! I will give it a look
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.