'Return True if the hda\'s job was resubmitted at any point.'

def has_been_resubmitted(self, hda):

    job_states = model.Job.states
    query = self._job_state_history_query(hda).filter((model.JobStateHistory.state == job_states.RESUBMITTED))
    return self.app.model.context.query(query.exists()).scalar()
