Finding all Work Items that **were** in my name (any state)
2 answers
I can't think of a way that a work item query can give you such result, as it does not give you access to history. On the other hand, the reportable REST API can do this with a bit of post-processing. You can just use this REST request:
https://clm:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[owner/userId!="marco"]/(id|summary|owner/(userId|name)|itemHistory[owner/userId="marco"]/state/name)This request shows you all the work items that are currently _not_ owned by user "marco", and also shows a previous state when "marco" was an owner. So in the result, the work items that do contain the "workitem/workItem/itemHistory/state" attribute are what we want. Simply replace the user ID "marco" with your actual one and you should get what you want.