← Back to team overview

dhis2-devs team mailing list archive

Re: Issues with custom attributes

 

Hi Mark,

We created an attribute and assigned that to a dataSet.Now we can see the
attribute in api as well as in maintenance app. Later while we were editing
the attribute we unassigned the dataSet to that attribute.In the
maintenance app we can see that the dataSet doesn't have attribute because
we have unassigned the attribute to the dataSet but through api call (which
we have mentioned in the previous mail) still we are able to see
the attribute to that dataSet.
 Could you please provide any inputs for this.

Thanks in advance,
Regards,
M.Durga Manasa.


On Wed, Jul 27, 2016 at 1:17 PM, Durga Manasa Maruboyina <
durgaman@xxxxxxxxxxxxxxxx> wrote:

> Hi Mark,
>
> We have created an attribute called "isPrintable" with a value type -
> "Yes Only" and assigned it to data set and program. In the maintenance
> app, when we look at the data set,the attribute is shown as a 'check
> box'. But in the older Data Sets app the attribute is not shown.And in the
> program app also the attribute is not shown.
>
> To create the "YesOnly" type attribute, We checked the below api,when we
> have the value as false (no value for the attribute) we are getting
> attributeValues as empty array and through the below api we are able to
> create the attribute (giving attribute value is false).
> *
> /api/dataSets.json?fields=id,name,attributeValues[:all,value,name,attribute[id,name,code]]*
>
> Could you tell the expected behaviour for attribute type "YesOnly ".
>
> Could you please provide any inputs on this issue? It would be really
> helpful if it's fixed as soon as possible as we have a use-case depending
> on this, and it's been blocking the work.
>
> *Thanks,*
> *regards,*
> *M.Durga Manasa.*
>
> On Tue, Jul 26, 2016 at 7:09 PM, Archana Chillala <
> archanac@xxxxxxxxxxxxxxxx> wrote:
>
>> Thanks for the update, Mark.
>>
>> Archana Chillala
>> Application Developer
>> Email archanac@xxxxxxxxxxxxxxxx
>> Telephone +91 9100960533 <+91+9100960533>
>> [image: ThoughtWorks]
>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>
>> On Tue, Jul 26, 2016 at 6:16 PM, Mark Polak <mark@xxxxxxxxx> wrote:
>>
>>> Hey Archana,
>>>
>>> The Yes Only attributes should now correctly render as checkboxes for
>>> both 2.24 and trunk.
>>>
>>> The other issue mentioned is a bit larger of a change and i have no
>>> estimate on that yet.
>>>
>>> On Tue, Jul 26, 2016 at 11:35 AM, Archana Chillala <
>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>
>>>> Hi Lars,
>>>>
>>>> Could you please provide any update on this issue? It would be really
>>>> helpful if it's fixed as soon as possible as we have a use-case depending
>>>> on this, and it's been blocking the work.
>>>>
>>>>
>>>> *Thanks,*
>>>>
>>>> Archana Chillala
>>>> Application Developer
>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>> Telephone +91 9100960533 <+91+9100960533>
>>>> [image: ThoughtWorks]
>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>
>>>> On Fri, Jun 24, 2016 at 4:08 PM, Lars Helge Øverland <lars@xxxxxxxxx>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 24, 2016 at 12:10 PM, Archana Chillala <
>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>
>>>>>> Thank you, Lars.
>>>>>>
>>>>>> I am able to reproduce the issues on the dev instance as well. 'Yes
>>>>>> Only' (and most other value types are rendered as blank fields)
>>>>>>
>>>>>>
>>>>>> [image: Inline image 1]
>>>>>>
>>>>>> Also, based on the '*value type*' of the Attribute, some attributes
>>>>>> show up in the new Data Sets module (in maintenance app) while some others
>>>>>> show up in the older Data Sets app on DHIS.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> Right, sorry I confused it with Yes/No. Issue reported here:
>>>>>
>>>>> https://github.com/dhis2/maintenance-app/issues/190
>>>>>
>>>>> regards,
>>>>>
>>>>> Lars
>>>>>
>>>>>
>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Archana Chillala
>>>>>> Application Developer
>>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>> [image: ThoughtWorks]
>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>
>>>>>> On Fri, Jun 24, 2016 at 2:58 PM, Lars Helge Øverland <lars@xxxxxxxxx>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Archana,
>>>>>>>
>>>>>>> thanks for the feedback.
>>>>>>>
>>>>>>> Did you test against
>>>>>>>
>>>>>>> On Fri, Jun 24, 2016 at 10:01 AM, Archana Chillala <
>>>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> We have created an attribute with a value type - "Yes Only" and
>>>>>>>> assigned it to data set. In the maintenance app, when we look at the data
>>>>>>>> set, instead of a 'check box', a blank text field is shown (when the value
>>>>>>>> type is 'Yes Only'). We tested with other value types, and looks like
>>>>>>>> except for option sets (which are rendered as a drop down list), all other
>>>>>>>> value types are shown as a text field.
>>>>>>>>
>>>>>>>> Here's the screenshot attached. "*Is this a report template?*" is
>>>>>>>> our attribute name of value type "Yes Only"- rendered as text field. "*test
>>>>>>>> attr"* is an attribute of type - option sets - rendered as drop
>>>>>>>> down.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Also, if the attribute has value type "Yes Only" and some new ones
>>>>>>>> added (like coordinate, file etc), when assigned to data set, we are able
>>>>>>>> to see them in the new Data Sets module of maintenance app, but not in the
>>>>>>>> older Data Sets app.
>>>>>>>>
>>>>>>>>
>>>>>>> This issue I cannot reproduce on /demo or /dev
>>>>>>> <https://play.dhis2.org/dev/dhis-web-maintenance/#>. Perhaps you
>>>>>>> tested on a bad revision. Could you please try to reproduce on dev?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> *Issue - attribute with option sets:*
>>>>>>>>
>>>>>>>> The Value type of option sets is not made mandatory. So, if we
>>>>>>>> create an option set without assigning a value type, and add that option
>>>>>>>> set to an attribute, we will not be able to create the attribute as the
>>>>>>>> value type of custom attribute is missing. (Basically, the value type of
>>>>>>>> option set is considered the value type of custom attribute. But when there
>>>>>>>> is no value type given, it takes "No Value" and attribute does not get
>>>>>>>> created. Also, looks like updating the value type of option set is not
>>>>>>>> possible.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> You are right - we need to make value type of option set not-null.
>>>>>>>
>>>>>>> Fixed now in trunk:
>>>>>>>
>>>>>>> https://github.com/dhis2/maintenance-app/issues/189
>>>>>>>
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> Lars
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Lars Helge Øverland
>>>>> Lead developer, DHIS 2
>>>>> University of Oslo
>>>>> Skype: larshelgeoverland
>>>>> lars@xxxxxxxxx
>>>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>>
>>> Mark Polak
>>> Software developer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>> mark@xxxxxxxxx
>>>
>>
>>
>

PNG image


References