Issue with creating/updating Attribute

While I create an Attribute and select object type and save, I receive a success response.

When I re-open the attribute selection for the object types are gone.

Also I checked the db, attribute table when I am creating the Attributes, objecttypes column is having [ ] instead it should contain something like [“DATA_SET”, “PROGRAM”].

Is this an issue with certain object types or an issue in overall for all the object types or am I doing something wrong?

Below is the log for creation of attribute. It doesnt have field objecttypes

{“auditType":“CREATE”,“auditScope”:“METADATA”,“createdAt”:“2024-09-11T05:48:58.626229”,“createdBy”:“xyz_user”,“klass”:“org.hisp.dhis.attribute.Attribute”,“uid”:“RJHxTV20Azx”,“attributes”:{“uid”:“RJHxTV20Azx”,“attributeValues”:},“data”:{“uid”:“RJHxTV20Azx”,“lastUpdated”:“2024-09-11T05:48:58.607”,“lastUpdatedBy”:“YIdyurWe8ZD”,“createdBy”:“YIdyurWe8ZD”,“created”:“2024-09-11T05:48:58.607”,“valueType”:“BOOLEAN”,“unique”:false,“name”:“test attributes”,“sharing”:{“owner”:“YIdyurWe8ZD”,“external”:false,“users”:{},“userGroups”:{},“public”:“rw------”},“mandatory”:false}} (AbstractAuditConsumer.java [org.springframework.jms.JmsListenerEndpointContainer#3-1])

I am using DHIS 2.40.4.1.

@dhis2-platform @dhis2-backend @dhis2-analytics

Hi @Vishwanideep_Kumar

Would you please share the steps to reproduce this on any of the play.dhis2.org? Sorry, for me, it’s not clear where all this is happening. Are you using the API? What endpoint? What is the API request? Or is on one of the apps - maintenance app?

The steps to reproduce this one will help figure out what’s going on. Thanks!

Hi @Gassim
Below are the steps to reproduce. Also attaching the screenshot for reference
Steps to reproduce:

  1. Navigate to Maintenance > Attribute.
  2. Enter a name for the attribute.
  3. Select a value type other than “Yes Only” and “text” (e.g., Yes/No). or try to edit exiting attribute whichever it there
  4. Select a specific object type (e.g., Data Elements, Datasets, Programs).
  5. Click Save.
  6. Attempt to edit the attribute to assign it to a metadata object.
  7. Observe that you are unable to successfully assign the custom attribute

@dhis2-platform @dhis2-backend @dhis2-analytics

1 Like

Hi @Gassim

Good Day!

Is this an expected behaviour or an issue?

1 Like

Thanks @Vishwanideep_Kumar. Sorry for the inconvenience here. Would you mind submitting a JIRA ticket for this issue (DHIS 2 Software - Issues - Jira)? I see that the save works to persist some object types (e.g. Category), but not for others (Data Set).

1 Like