Data Visualizer app adding space to TEXT data value Details only

I was trying to check the data value for a DE with TEXT valueType in the Data Visualizer app. I noticed that the values have space added to the value as shown in the attached image. I have selected the Details only DISAGGREGATION when selecting the data.

When I checked the original value selected in the form, there is no space i.e Residing, Not Residing, CO instead of C O.

Hi

This is totally strange! Could you share the steps to reproduce in any of the play.dhis2.org instances? Maybe there are options to change that will display the text differently (and if not then maybe we can create a bug issue)?

Thank you!

@Gassim I checked the value in the database datavalue table and there is no space in the value. Here is another example. I am using a custom form and the value are selected from the form.

Database

Is there a chance please to share steps to reproduce this issue in any of the play.dhis2.org instances so I could ask frontend team to test it and we can report it as a bug?

Thank you!

1 Like

Unfortunately, I created the form with a custom app. So I don’t know how to reproduce the data in dhis2. However, when I use the search feature of the Data Visualizer app to search the DE name and select one DE, the value return without space as expected like the image below for comm1.

error1

1 Like

Right, thanks! Then maybe it’s something that you can tweak in your app?

As I said the data is stored properly in the database and it appears without space individually.

But when I use the search feature of the Data Visualizer app to search data elements and select more than one DE in a pivot table, the value return with spaces. But if I select one data element, it returns without space.

1 Like

Okay, thanks! But if it’s stored exactly the same way as other data values, why do you think these ones are being retrieved differently?

That is the million question. The only difference I have noticed is that if I select more than one DE in a pivot table for details, the value return with spaces. But if I select one data element, it returns without space.

1 Like

Hi @jetisco4u

Thanks for reporting! This is a bug and is being followed by the developers. [DHIS2-14172] - Jira

Would you please check for the API responses? The analytics and the metadata part of the response?

Thank you!

@jetisco4u in which version of DHIS2 are you seeing this?

1 Like

2.38.1.1

1 Like

Thanks for creating this in a Jira. I will follow the update.

By the analytics and the metadata part of the response do you mean I should check my backend log?

1 Like

Thanks! I mean the API endpoints, analytics endpoints and metadata endpoint both of which you will find in the Networks tab (F12 → Network)

Any update on this issue?

1 Like

Thanks! Were you able to get more info (network requests) for understanding the issue (or steps to reproduce this on play.dhis2.org?)?

Not yet. I reported in Jira and it seems it was acknowledged as a bug. But I don’t know what becomes of the issue.

By the way I cannot reproduce the error in play.org

It seems the issue is happening because I am using a custom app. Is it ok if I save the value as a string for TEXT valueType?

Hi

Sorry for the delay.

Please share the link to the Jira issue you’d created? I can’t find it on https://dhis2.atlassian.net/issues/

It’s this one, right? [DHIS2-14172] - Jira and please check this one: [DHIS2-14339] - Jira

How are you using it in a custom app? What version of dhis2 are you uploading and testing your app?

Thanks!

The ones you shared capture my concern though I’ll check the one I posted.

I was able to use a different method to stringify my value especially array values and for now the space disappear.

Sometimes this thing work, sometimes it doesn’t.

So I upload the updated app and check the data coming in the production instance. It happens that the space reappears. The production instance is on 2.39.0
My dev instance is on 2.39.0.2