Description
Issue Summary
Trying to change the description of a feature using a PATCH or a PUT method, removes the values of fields that are not displayed in the UI (not enabled in the Details Panels Settings of a Portfolio or under the Plateform in the case of the Product with the Manage Product option).
Even if you specify the values for the fields, they are ignored
In the audit log you see the following:
By Francois Panaget via API on 12/09/2022 09:53:25
Feature was updated
Description Changed - From [ FXP Baclog2 ] To [ FXP Baclog2 changed ]
Product Changed - From [ FXPProductCH ] To [ ]
Category Changed - From [ Innovation ] To [ ]
Steps to Reproduce
- Make sure the option 'Manage Product' under Admin > Platform > Portfolio Specific configuration > "YourPortfolioName" is set to 'Yes' and/or the 'Category' field is enabled under Admin > Details Panels Settings > "YourPortfolioName" > Features
- Create a Feature where you set a product and a Category.
- Set the option under 'Manage Product' Admin > Platform > Portfolio Specific configuration > "YourPortfolioName" to be 'No' and/or disable the 'Category' field under Admin > Details Panels Settings > "YourPortfolioName" > Features
- Issue a PATCH or PUT REST API call to change the description of the feature.
For example, using a PATCH with the body:[ { "op": "replace", "path": "/description", "value": "FXP Baclog2 changed" } ]
or with the existing value
[ { "op": "replace", "path": "/description", "value": "FXP Baclog2 changed" }, { "op": "replace", "path": "/productId", "value": 66 }, { "op": "replace", "path": "/category", "value": 1 } ]
Expected Results
As the value for the Category and Product was not changed (it is just hidden) it will not be changed and the Audit Log will not register any change.
If you specify a value for these hidden fields, the value is taken into account (if equal to existing it is ignored and if different, the field is updated with the new value).
Actual Results
A change is registered on the Audit Logs and the value previously set for the product and category is wiped out/removed.
If you specify a value (equal to existing or new) for these hidden fields, the value is ignored.
Workaround
To prevent this behavior make sure to make to make the field visible in the UI thru for example Admin > Platform > Portfolio Specific configuration > "YourPortfolioName" and/or the 'Category' field is enabled under Admin > Details Panels Settings > "YourPortfolioName" > Features.
Attachments
Issue Links
- relates to
-
ALIGNSP-15506 Loading...