pr_urls = ['https://github.com/company/test-repo/pull/9']
for url in pr_urls:
api_response = api_instance.search_tasks_for_workspace(workspace_gid, text=url)
api_response_dict = api_response.to_dict()
response_data = api_response_dict["data"]
print(response_data)
The response_data I get back contains the metadata of 4 tasks – two of which do have this exact URL I’m searching for, but the other two contain similar, but not exact URLs.
Support confirmed searching for an exact match is currently not possible.
Sep 29, 2023, 12:30 AM PDT
Thank you for reaching out to us. I understand that you are looking for a way to only get exact matches in a search API call.
Currently there isn’t a way to search for exact match using our advanced search using API, similarly to the UI.
Having said that, I can easily understand your point and how it could improve Asana. For this reason, I have gone ahead and noted your report for our Product Team. I think it will be important for making our product more robust in the future. I also believe that these kinds of reports might encourage our engineers to implement this option.
Thanks for taking the time to share your feedback with us. It really helps us understand the needs of the people who use our product.
However, given that I am searching specifically for GitHub pull requests that are attached with the GitHub integration, I found that I am able to get attachments for the objects returned by the fuzzy search, get the attachment details, then check if the “view_url” is an exact match.