Reportable REST interface -- apt/workResourceDetails not working
https://hub.jazz.net/ccm01/rpt/repository/apt?fields=apt/workResourceDetails[developmentLine/itemId='...']/(*|contributor/*|contributor/workDays/*|contributor/absences/*)
but the response always come back empty. In fact, even just a simple query for any workResourceDetails comes back empty (e.g.
https://hub.jazz.net/ccm01/rpt/repository/apt?fields=apt/workResourceDetails/*&size=5
I've used this type of query on other RTC installations, so this seems to have been intentionally disabled on Jazz Hub-- can this be reenabled?
Thank you in advance.
- Andre Asselin
2 answers
Comments
and I received this output http://pastebin.com/2LFvjNig
Ankur,
Thanks for taking a look at this. If I execute your query, I get the results you posted. But if I try the same query and substitute my developmentLine itemId, I get an empty result set:
https://hub.jazz.net/ccm01/rpt/repository/apt?fields=apt/workResourceDetails[developmentLine/itemId=('_Z02pYMPGEeKBWfwHYCvlmQ']/(|contributor/|contributor/workDays/|contributor/absences/)
Here's the developmentLine info:
<developmentLine>
<uniqueId>36cbc72ec8426bf303c215070d515e1a</uniqueId>
<stateId>_Z7ZwwA0ZEeOJOKWTvTaZZg</stateId>
<itemId>_Z02pYMPGEeKBWfwHYCvlmQ</itemId>
<contextId>_Zv4Cx8PGEeKBWfwHYCvlmQ</contextId>
<modified>2013-08-25T00:00:51.660+0000</modified>
<name>Main Development</name>
<archived>false</archived>
</developmentLine>
I am not a member of your project area so can not see the data related to it. Is it a public project area? Can you give me some access to it for few days which we can remove later once this is sorted out?
Ankur,
I'm going to see if I can repro this on a test private project. If I can't, then we can temporarily add you. I'll work on it this afternoon.
Thanks for you help with this!
- Andre
Ankur,
Apologies for not getting back to you the other day-- stuff came up.
I was able to repro with a test private project. Can I get your email address so that I can add you to the project?
- Andre
Can you share the project link. I will then send you a request to join which you can accept. Posting email address is on a forum is not a wise thing to do :)
https://hub.jazz.net/project/asselinps/test1
My bad. Currently Jazzhub doesn't exposes the Work Allocation data. Since it is not set for the user, hence not showing up in the REST output.
Ankur,
I don't understand what you mean. It seems Jazzhub is exposing the data through this API for public projects, but not private ones. Further, I can get the data through other calls (one by one for each person) on a private project-- the reason I'm asking this question is because what I found is that this specific API isn't working, and without it, I'd have to make add a decent amount of complexity to the client app and make multiple calls to Jazzhub to get the data.
Thanks...
Andre
Starting from: fields=apt/workResourceDetails/* will only list the explicit assignments. It will not list the system generated default assignments.
If you want the implicit default assignments, use: fields=apt/contributor/(name|assignments/*)
Please avoid using wildcards against a production server, the results could be huge and only ask for the fields you need.
Comments
fields=apt/contributor/(name|assignments/*) will actually return the combined implicit and explicit assignments. But the call can be expensive as it has the examine data like: team area membership combined with the explicit assignments, etc...
This is inline with what I found here as well. Once I went and generated some explicit data, I was able to get results with the requests you provided. If you run them again, you will see there is some data coming back now as I put in some work allocations for myself.
One issue we might need to address (or think about addressing) here is that the ccm user profile is not really exposed on JazzHub. It is not clear where users would go to input this information due to the changes we have made to the banner and navigation structure.
Is the work allocation breakdown something that's important to you?
Thanks guys for the suggestions. My goal is to try to get all the assignments, absences, and work day info for everyone assigned to a particular project so that I can create reports and such.
The reason I'm going from apt/workResourceDetails/ is try and get all of that info with 1 call-- in the original call I posted, you can see I'm filtering on the developmentLine/itemId, and requesting that info:
https://hub.jazz.net/ccm01/rpt/repository/apt?fields=apt/workResourceDetails[developmentLine/itemId='_J9woAfOhEeKmUe8rNxZggQ']/(|contributor/|contributor/workDays/|contributor/absences/*)
What is strange is that Ankur discovered that while that call doesn't work for private projects, it does work for public projects (see his example above that works).
I could start from apt/contributor, but in that case, I'd need to make multiple calls to get each contributor.
Starting from apt/contributor, you can't filter on a developmentLine/itemId. Ex:
https://hub.jazz.net/ccm01/rpt/repository/apt?fields=apt/contributor[assignments/developmentLine/itemId='_J9woAfOhEeKmUe8rNxZggQ']/(|assignments/|assignments/projectArea/|assignments/developmentLine/|workDays/|absences/)
Error 500: CRRED0135E: Illegal filter. The field 'apt/assignments/developmentLine/itemId' may not be used in a filter because it returns multiple values.
So, bottom line, it seems like there's a difference between how public and private projects behave. If that's something that can be addressed, that'd make the query easier (and probably use less server resources too, I'd imagine). If not, then the only way I can see to get the data is with a number of calls via apt/contributor.
Any thoughts / ideas?
Thanks,
Andre
Hi Andre. I am not sure what tool you are using to collect the data. But you could create one query to fetch all the members of a project area. Then iterate over each member and find their assignments. A tool like RPE makes it easy to write such reports and can even let you filter on the data just in case some of those filters cannot be expressed in a single URL.
Adam @agarcher,
I see what you mean about the ccm user profile. From the eclipse client, you can enter vacation and change work hours, but can't change your work allocation across projects (it links you to the web client, which for jazz hub, just redirects you to the home page).
All that info is necessary to be able to build a schedule and answer "are we going to make the deadline", "who's overloaded", etc type of questions.
- Andre
@andre I was able to get it to work for private projects. I believe the reason it looked like it wasn't working for private projects was because there wasn't any explicit data.
@agarcher FYI, my userid is @asselinps, so Jazz.net didn't send me a notification for your last comment.
Work is crazy right now, but when I get some time, I'll add some explicit data to my test project and see what happens.
Bottom line though-- the way it works now-- is that by design and the way it will continue to work in the future, or will private projects start surfacing implicit data through apt/workResourceDetails at some point?
Thanks!
Andre
Comments
Adam Archer
FORUM MODERATOR / JAZZ DEVELOPER Aug 07 '13, 8:52 p.m.Hi Andre,
We haven't deliberately disabled the API, so it's probably an issue with our deployment. We'll look into it and let you know what we find.
Scott Rich
JAZZ DEVELOPER Aug 08 '13, 5:20 a.m.I can confirm that the problem exists, even for me with Admin permissions on that RTC server. This script shows the empty result from hub.jazz.net/ccm01 versus a full page from jazz.net/jazz:
!/bin/sh
verbose="-v"
verbose="-silent"
jazzUserid="jazzuser"
jazzPassword="jazzpassword"
serverURL="https://hub.jazz.net/ccm01"
serverURL="https://jazz.net/jazz"
curl $verbose -c cookies.txt -b cookies.txt -k -L $serverURL/authenticated/identity
curl $verbose -k -c cookies.txt -b cookies.txt -d j_username=$jazzUserid -d j_password=$jazzPassword $serverURL/authenticated/j_security_check
curl $verbose -c cookies.txt -b cookies.txt -k -L $serverURL/rpt/repository/apt?fields=apt/workResourceDetails/*&size=5
@asselinps, I assume you are authenticating when you invoke the service? And you get a valid, but empty response?
We'll continue to investigate why we're seeing the empty responses. It may be a permissions issue.
Andre Asselin
Aug 09 '13, 11:13 a.m.@Scott Rich, correct, I am authenticated, and get a valid, empty response.
Thanks for looking into this!
- Andre Asselin
Andre Asselin
Aug 13 '13, 8:46 p.m.@Scott or @Adam,
Any progress?
- Andre
Andre Asselin
Aug 22 '13, 10:14 p.m.ping......