Get items modified by a specific user after a certain date with EWM Reportable REST API
Hello,
Im trying to get all items in our project, that have been modified by a set user after a certain date.
For example, I want all items that I modified after this date 01.November.2023:
ccm/rpt/repository/workitem?fields=workitem/workItem[modified>2023-11-01T10:00:00.000%2b0200 and modifiedBy/name=PATRICK]/(id|summary)
the problem is this will only return an item if the last change was by me, not if i modified the item on the 02.November.2023 but someone else modified the item a day later.
So I tried again using the itemHistory:
/ccm/rpt/repository/workitem?fields=workitem/workItem/itemHistory[modified>2023-11-01T10:00:00.000%2b0200%20and%20modifiedBy/name=PATRICK]/(id/summary)
This only returns repeating <workItems/> without an id or a summary.
The wiki unfortunately was no help to me, can anyone help me out please? I cant provide images since you need 60 reputation points to do that.
We use EWM 7.0.2 SR1
Best regards
Patrick
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Dec 06 '23, 2:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Dec 06 '23, 2:31 a.m. The behavior of the API indicates that you have an issue with the URL or specification what information to return. Things to look at would be URL encoding.
Comments Hi Ralph,
thanks for the fast answer, I replaced the / with a pipe, must have overseen that, unfortunately that isnt the problem I still get the same reply like this:
<workitem Version="1.0.0" rel="next" href="https://our.server.net/ccm/rpt/repository/workitem?id=_VpK-QJQMEe6A3J5zZbB-tA&fields=workitem%2FworkItem%2FitemHistory%5Bmodified%3E2023-11-01T10%3A00%3A00.000%2B0200%20and%20modifiedBy%2Fname%3DPATRICK%5D%2F%28id%7Csummary%29&size=100&pos=100">
<workItem/>
<workItem/>
<workItem/>
</workItem>
Ralph Schoon
commented Dec 06 '23, 4:18 a.m.
| edited Dec 06 '23, 4:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
https://elm.example.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=1 or id=2]/(id|summary) or https://elm.example.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=1 or id=2]/(*) get the data and display what you are interested in and then you work on the filter?
Ok your example worked flawlessly.
Then Itried doing this filter, that worked and displayed all data as intended.
As soon as I add a filter for the itemHistory, no matter which one, I get the same reply as in my last comment containing only <workitems/>.
This seems like a bug to be honest.
Ralph Schoon
commented Dec 06 '23, 5:14 a.m.
| edited Dec 06 '23, 5:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
https://elm.example.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=1]/(itemHistory/(*)) shows the item history for me. With the filter, consider URL encoding and the like. Note that the itemHistory is the history states of the work item. The filter only selects the set of work items. This set of work items is then used and the history for each item is displayed. This makes no sense at all, I think:
You can not add arbitrary filters like that. You have one filter, I think. Like
https://elm.example.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[modified%3E2023-11-29T10:00:00.000%2b0200andmodifiedBy=whatever]/(itemHistory/())
showing 5 of 6
show 1 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.