code: def taskotron_changed_outcome(config, message):
      
  
      # We only operate on taskotron messages, first off.
      if not taskotron_result_new(config, message):
          return False
  
      outcome = message['msg']['result'].get('outcome')
      prev_outcome = message['msg']['result'].get('prev_outcome')
  
      return prev_outcome is not None and outcome != prev_outcome
docs: Taskotron task outcome changed
  
      With this rule, you can limit messages to only those task results
      with changed outcomes. This is useful when an object (a build,
      an update, etc) gets retested and either the object itself or the
      environment changes and the task outcome is now different (e.g.
      FAILED -> PASSED).