         response (esd/search @conn index-name deployment-type :filter {:and {:filters filters}} :size (or size 10) :from (or from 0) :sort {:start "desc"} :_source (source-filter full?))]
     (->> response
          esrsp/hits-from
-         (map (fn [h] (assoc (:_source h) :id (:_id h)))))))
+         map-to-source-with-id)))
 
 (defn create-task
   [task-id deployment-id document]

    {:include ["application" "end" "environment" "message" "phase" "region" "start" "status" "user"
               "new-state.hash" "new-state.image-details"
               "previous-state.hash" "previous-state.image-details"]}))

(defn get-deployments
  [{:keys [application environment full? from region size start-from start-to status]}]

  [deployment-id]
  (nil-if-no-deployment deployment-id (->> (esd/search @conn index-name task-type :query (q/match-all) :filter (parent-filter deployment-type deployment-id) :sort {:sequence "asc"} :size 10000)
                                           esrsp/hits-from
                                           map-to-source-with-id
                                           (map #(dissoc % :sequence)))))

(defn deployment-logs
