Updating a value from a non-required Assets object attribute shows "At least one value must be set"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When setting up an Assets Schema, if some attributes are configured with a Cardinality of at least 1 while others are set to zero, it may result in a confusing error when attempting to update a non-required attribute.

How to replicate

  1. Have an object created with some attributes. For this test, 3 of them ('one', 'two' 'three') as text type.

  2. Have the 'one' attribute empty, and fill 'two' and 'three' with some value.

  3. Update the object type and set 'one' as required (cardinality minimum value is set to 1).

  4. Try to update the object that was previously created. Remove the values of 'two' and 'three'.

How to identify the required attribute

In this example, we used three attributes. However, objects typically possess numerous attributes, making individual checking challenging.

To easily identify the required attribute(s), you can use the Developer tools on your browser.

  1. Access one of the affected objects.

  2. Opening the Developer tools, go to the Network tab and click on to remove unnecessary logs.

  3. Replicate the issue by trying to remove the value of a non-required attribute.

  4. Click on the error log (like the example below) which will show on the headers the following error:

    Request Method: DELETE
    Status Code: 400 Bad Request
  5. On the Response tab, it will show one or more required attributes that are causing the issue.


Solution

After obtaining the ID from the Response tab, locate it in order to configure its Cardinality or add a value before editing a non-required attribute; this sequence allows for subsequent edits on other non-required attributes.



References


Last modified on Apr 11, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.