Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi, Is It Possible To Apply And Logic In Task.Get_Tasks? For Example, In The Below Example Tags Is A List Of Tags And I Want To Only Fetch Tasks That Has All Of Said Tags

Hi, is it possible to apply AND logic in Task.get_tasks? For example, in the below example tags is a list of tags and I want to only fetch tasks that has all of said tags
tasks = Task.get_tasks(project_name=job.project_name, task_name='^' + job.task_name + '$', task_filter={'tags': tags, 'type': [job.task_type], 'system_tags': ['-archived']})

  
  
Posted 2 years ago
Votes Newest

Answers 2


Great, I'll try, thanks!

  
  
Posted 2 years ago

Hi ImmensePenguin78 ,
When creating the tags list, try doing this: tags = ["__$and", "tag1", "tag2", "tag3", ...] this should make sure you get only tasks with all the specified tags

  
  
Posted 2 years ago
621 Views
2 Answers
2 years ago
one year ago
Tags