Calculated attribute wrong after migration to GCP Postgres
search cancel

Calculated attribute wrong after migration to GCP Postgres

book

Article ID: 202304

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

Calculated attribute calculates the total sum of actuals amount from the custom object line items records under the custom object plan. When All custom object item records have a "0" or blank in the "Calculated" field the "Calculated" attribute will display "10" on the Custom Object List record.

This is incorrect, when all custom object item records have “0” or blank for the actuals, the attribute should display 0.

Environment

Release : 15.8.1

Component : CA PPM SAAS STUDIO

Resolution

When the result is ZERO, the return value is:  0E-10

OLD code:  select SUM(act.calculated_testfield)

New code:  >select round(SUM(act. calculated_testfield)::decimal, 3 )