Jakobud

Untitled

Jan 26th, 2012
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fields=['sg_status_list','id','entity','project']
  2.  
  3. condition1 = { 'path' : 'step', 'relation' : 'is', 'values' : {"type": "Step", "id": step_id} }
  4. condition2 = { 'path' : 'task_assignees', 'relation' : 'is', 'values' : {"type":"HumanUser", "id": user_id} }
  5.  
  6. status1 = { 'path' : 'sg_status_list', 'relation' : 'is', 'values' : [ip] }
  7. status2 = { 'path' : 'sg_status_list', 'relation' : 'is', 'values' : [rdy]}
  8. condition3 = { 'logical_operator' : 'or' , 'conditions' : [ status1, status2 ] }
  9.  
  10. filters = { 'logical_operator' : 'and', 'conditions' : [condition1, condition2, condition3] }
  11.  
  12. tasks = self.sg.find("Task",filters,fields)
RAW Paste Data