Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

1

0 votes



One answer

Permanent link

 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.

It is important to understand the structure of the query that specifies what information is returned how. In your 2nd example you have a slash / instead of a pipe | in (id/summary) The slash indicates summary should be a nested property of ID, which is not correct.

I tried to summarize my experience with the EWM Reportable REST API here:
https://rsjazz.wordpress.com/2022/03/02/ewm-reportable-rest-api/   

0 votes

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/>
<workItem/>
<workItem/>
</workItem>

 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. 

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.

showing 5 of 6 show 1 more comments

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 369
× 67

Question asked: Dec 05 '23, 9:53 a.m.

Question was seen: 885 times

Last updated: Dec 06 '23, 6:43 a.m.

Confirmation Cancel Confirm