dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08814
Re: [Bug 510109] Re: Catcombo deletion problems
Hi sir,
I forgot this bug. Sorry, sir.
Quang and I fixed this bug into my branch. But before I came to India, I
wanted to merge this into the trunk, but there are many, many conflicts
because I had forgotten it so long time.
If Hieu have to continue this task, he can refer my branch :)
Thank a lot, sir :D
Best regards,
------------------------------------------------
Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@xxxxxxxxx
Cell phone: +84 97 324 1542
2010/11/27 Lars Helge Øverland <larshelge@xxxxxxxxx>
> ** Changed in: dhis2
> Assignee: Thu Tran (tran-hispvietnam) => Hieu Duy Dang
> (hieu-hispvietnam)
>
> --
> Catcombo deletion problems
> https://bugs.launchpad.net/bugs/510109
> You received this bug notification because you are a bug assignee.
>
> Status in DHIS 2 - District Health Information Software: Confirmed
>
> Bug description:
> When deleting categorycombos I've come across a few issues:
>
> 1) When trying to delete a categorycombo that has categoryoptioncombos
> referenced in datavalue an exception is thrown. This should be replaced by a
> more appropriate message saying something like "You cannot delete this
> object as it is referenced by data values". When doing the same for
> categories you get a nice little pop up saying something like that, which is
> needed for catcombos as well.
>
> 2) When trying to delete catcombos "with" data like above the catcombo is
> not deleted (which is good), but before you get the exception the reference
> from all data elements to that catcombo is deleted and replaced by the
> default. This is very confusing and not correct behaviour. Would it be
> possible to to a dry run like process and check whether the catcombo can
> actually be deleted before deleting the data element-catcombo associations?
>
> 3) When deleting a catcombo that "has" no data then the catcombo is deleted
> together with its categoryoptioncombos. But indicator formulas referencing
> those deleted catoptioncombos are not deleted, so when opening such a
> formula you get an exception like this:
> Exception (java.lang.IllegalArgumentException): Identifier does not
> reference a category option combo: 360802
> Same thing probably goes for validation rules, but haven't checked this
> yet. I suggest we simply empty the formulas that contain deleted
> catoptioncombos and leave it up to the user to fill in a new valid formula.
> No need to delete the indicator itself. The ideal would be to provide the
> user with a list of indicators and validation rules where formulas have been
> deleted to make the user aware of the need to updated these.
>
>
>
--
Catcombo deletion problems
https://bugs.launchpad.net/bugs/510109
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
Status in DHIS 2 - District Health Information Software: Confirmed
Bug description:
When deleting categorycombos I've come across a few issues:
1) When trying to delete a categorycombo that has categoryoptioncombos referenced in datavalue an exception is thrown. This should be replaced by a more appropriate message saying something like "You cannot delete this object as it is referenced by data values". When doing the same for categories you get a nice little pop up saying something like that, which is needed for catcombos as well.
2) When trying to delete catcombos "with" data like above the catcombo is not deleted (which is good), but before you get the exception the reference from all data elements to that catcombo is deleted and replaced by the default. This is very confusing and not correct behaviour. Would it be possible to to a dry run like process and check whether the catcombo can actually be deleted before deleting the data element-catcombo associations?
3) When deleting a catcombo that "has" no data then the catcombo is deleted together with its categoryoptioncombos. But indicator formulas referencing those deleted catoptioncombos are not deleted, so when opening such a formula you get an exception like this:
Exception (java.lang.IllegalArgumentException): Identifier does not reference a category option combo: 360802
Same thing probably goes for validation rules, but haven't checked this yet. I suggest we simply empty the formulas that contain deleted catoptioncombos and leave it up to the user to fill in a new valid formula. No need to delete the indicator itself. The ideal would be to provide the user with a list of indicators and validation rules where formulas have been deleted to make the user aware of the need to updated these.
References