   getSelectedWorkflow: (project, preferences) ->
     @setState selectedWorkflow: 'PENDING'
 
-    preferredWorkflowID = preferences?.preferences.selected_workflow ? project.configuration?.default_workflow
+    # preference user selected workflow, then project owner set workflow, then default workflow
+    if preferences?.preferences.selected_workflow 
+      preferredWorkflowID = preferences?.preferences.selected_workflow
+    else if preferences?.settings.workflow_id
+      preferredWorkflowID = preferences?.settings.workflow_id
+    else if project.configuration?.default_workflow 
+      preferredWorkflowID = project.configuration?.default_workflow
+
     if preferredWorkflowID?
-      apiClient.type('workflows').get preferredWorkflowID
+      apiClient.type('workflows').get preferredWorkflowID, {}
         .then (workflow) =>
           if workflow.active
             @setState selectedWorkflow: workflow

      @updateSugarSubscription nextProps.project
      @context.geordi?.remember projectToken: nextProps.project?.slug
    else if nextProps.preferences?.preferences.selected_workflow isnt @state.selectedWorkflow?.id
      @getSelectedWorkflow nextProps.project, nextProps.preferences

  fetchInfo: (project) ->
    @setState

  componentDidMount: ->
    @_boundForceUpdate = @forceUpdate.bind this
    @fetchProjectData @props.params.owner, @props.params.name, @props.user
      # .then =>
      #   # For testing! Simulating a new assignment coming in after some time.
      #   setTimeout ( => 
      #     console.log('set selected workfow')
      #     @state.preferences.update "preferences.selected_workflow": '2333'
      #   ), 5000

  componentWillReceiveProps: (nextProps) ->
    {owner, name} = nextProps.params
