REST API - "defaultAllocationPercent" is null when "expand" is used to fetch team details in Projects API
search cancel

REST API - "defaultAllocationPercent" is null when "expand" is used to fetch team details in Projects API

book

Article ID: 211236

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Steps to Reproduce: 
1. Navigate to Home -> Projects. Open a project record. From the URL fetch the Internal ID of the project

2. Navigate to the "Team" tab and make sure that there is at least one record present there. Open the properites of the Team record and check that "Default Allocation %" has a value against it

3. From the URL, fetch the "teamID" internal ID

4. Use the following GET call to fetch details of this team record. Project Internal ID from step 1 and Team Internal ID from step 3 will have to be used

http://clairty_server/ppm/rest/v1/projects/<project_internal_ID>/teams/<team_internal_ID>
For Example: http://clarity_server:80/ppm/rest/v1/projects/5001089/teams/5001188

5. Search for "defaultAllocationPercent" in the response. Note the value against it

6. Use the following GET call now using the Project Internal ID from step 1

http://clarity_server/ppm/rest/v1/projects/<project_internal_ID>?expand=(teams=(fields=(resourceId,resourceName,defaultAllocationPercent,etc)))
For Example: http://clarity_server:80/ppm/rest/v1/projects/5001089?expand=(teams=(fields=(resourceId,resourceName,defaultAllocationPercent,etc)))

7. Search for "defaultAllocationPercent" response. Note the value against it

Expected Result: The value in Step 5 and 7 are identical

Actual Result: The value in Step 5 is NOT NULL. Whereas the value in Step 7 is NULL. Notice that the same issue does not arise with "ETC" attribute

Workaround: Instead of being able to get value against the defaulAllocationPercent attribute in one REST Call, we can make two calls to obtain this information as below.

1. Get all the teams against a project:

http://clarity_server:80/ppm/rest/v1/projects/5058062/teams

2. Iterate over each team record to get defaultAllocationPercent:

http://clarity_server:80/ppm/rest/v1/projects/5058062/teams/5062472?fields=resourceId,defaultAllocationPercent

Environment

Version: 15.9.1

Cause

Due to a defect with ID DE60204.

Resolution

This issue is fixed in version 15.9.3.