dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #45611
Re: Two shortName errors
Ah yes, thank you.
Greg
On Thu, Jun 23, 2016 at 8:40 AM, Knut Staring <knutst@xxxxxxxxx> wrote:
> Hi Greg,
>
> This seems like a good bug report. I think the team prefers to gather good
> ones here:
> https://github.com/dhis2/maintenance-app/issues/
>
> Regards,
> Knut
>
> On Thu, Jun 23, 2016 at 1:51 PM, Greg Wilson <gwilson@xxxxxxxxxxxxxx>
> wrote:
>
>> Greetings. Hopefully this is the right location for this issue. I have
>> discovered a few issues seemingly revolving around the shortName field. On
>> the Maintenance app the field is often shown as not required. This is
>> apparently not entirely the case.
>>
>>
>> *1: 500 Error on creating DE Group with empty ShortName*
>> Route:
>> /dhis-web-maintenance/#/edit/dataElementSection/dataElementGroup/add
>>
>> How to replicate:
>>
>> Add new Data Element Group
>> Specify a unique Name
>> Put a space (possibly anything) into the shortname field, but then remove
>> it
>> Save
>>
>> Add a second new DE Group
>> Specify a unique Name
>> Put a space into the shortname, then remove it
>> Put something into the code field (so the form thinks we are entering
>> data)
>> Save
>>
>>
>> Check network console for error 500 response. Digging through you will
>> see:
>> org.postgresql.util.PSQLException: ERROR: duplicate key value violates
>> unique constraint "uk_6x37lph70r5mh15a71pf1tj17"
>> Detail: Key (shortname)=() already exists.
>>
>> Expectation:
>> Either allow for empty shortnames, or prevent submission.
>>
>> *2: Organisational Unit shortName Bypass*
>> How to replicate:
>>
>> Add a new OU
>> Enter Opening Date
>> Enter Name
>> Put a space into the shortname, then remove it
>> Save
>>
>> Repeat
>>
>> The first record is created without a shortname. The network response is
>> "200 OK" but the contents of the response contains
>> "importConflicts":[
>> {"object":"aaaaa","value":"Empty shortName for object ...
>>
>> Repeat the process and more records will be created. This time they will
>> have an additional "conflict":
>> "importConflicts":[
>> {"object":"eeeee","value":"Empty shortName for object ...
>> {"object":"eeeee","value":"Object already exists."}
>>
>> "eeeee" does not already exist as this is the first time I used that
>> Name. I think it is trying to key off of shortName (blank).
>>
>> Expectation:
>> Either allow for empty shortnames, or prevent submission.
>>
>>
>> Hope this helps.
>>
>> --
>> Greg Wilson
>> BAO Systems
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
--
Greg Wilson
BAO Systems
Follow ups
References