Getting project LastComment, not workng as expected (On Prem, Web API, C#)
On Premises
Web API (C#)
I’ve noticed that when including LastComment (and/or LastComment_Id) in my Model Properties for a Project I only see it when there is 1 ItemComment associated with the Project. If there are 0, or 2+ ItemComments then I don’t get any LastComment.
I’ve been seeing this on my Project.GetActive method.
-
This is an issue that has a work around in our current on premises version 18.1.0.9.
Under the Companies administration (for the default Company of the current user), edit that company and set the 1st checkbox to true. The checkbox is labeled: "Indicates the company is internal, granting special rights to members (i.e. viewing internal comments)"
This allows the "LastComment" field to be filled in Get type API calls for Project, Task and Issue.
Please note that this is an edge case issue related to an on premises installation running an older version. It was not stated which subsequent version this issue was fixed in.
1 -
Hello Gary,
I just tested the /api/project/active method and did a spot check. I can verify that the response did indeed return the correct LastComment object.
{
"LastComment_Id": "1a56371a-c038-4eb8-996c-61a6e77df07a",
"LastComment": {
"ObjectId": "e00f2ef7-b014-45f5-a844-8f7c126ff398",
"CommentBody": "Hello World!",
"UserCreated_Id": "ca76178f-862a-4598-a1c9-afdb98148660",
"CreatedDateTimeUTC": "2018-06-28T23:00:58.327Z",
"Id": "1a56371a-c038-4eb8-996c-61a6e77df07a",
"IdExternal": null
},
"Id": "e00f2ef7-b014-45f5-a844-8f7c126ff398",
"IdExternal": null
}As you can see in my example, "Hello World" is returned at the LastComment.
Let me know if have any further questions.
Thank you,
Robert0 -
OK, here is my example:This is a subset of the 120 project return from the above data.... Notice that as expected, ItemNumbers 2335 and 2311 have a LastComment. And as expected, ItemNumbers 2332, 2334 and 2271 don't have a last comment because they have no comments. Then, what about Item Numbers 2337 (2 comments) and 2333 (5 comments) that do not have a LastComment?
0 -
Where can I upload the output of the Project.ActiveAndPlanningUserCanView - C# API (REST) Client Tester so you can see what I am talking about? The snippet that I have is 141 lines long, and does not fit well into a jpeg, gif or png that is allowed for upload.
0 -
Hello Gary,
You can email the output data to robert.aronovici@projectinsight.com.
I'll review and also test the ActiveAndPlanningUserCanView method to make sure my response return the correct properties (I tested the 'Active' method only).
Thank you,
Robert
0
Please sign in to leave a comment.
Comments
5 comments