[Bug 1614543] [NEW] Dry run Alters Data 2.23

Public bug reported:

Hello devs!

Just found in 2.23 a bug that will alter metadata during a dry run.

Also, if someone come point me at the documentation for the logic for
updating existing objects? Right now if a name is the same, it will
alter the existing code and uid to the incoming code and uid rather than
erroring out, which to me seems like a bad idea to ever edit a UID.

You can see an example of this here:

The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.

** Affects: dhis2
     Importance: Undecided
         Status: New

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  New

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

** Changed in: dhis2
     Assignee: (unassigned) => Morten Olav Hansen (mortenoh)

** Changed in: dhis2
    Milestone: None => 2.25

** Changed in: dhis2
   Importance: Undecided => Medium

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  New

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

Hi,

I will look at this bug. Just know that in 2.23 (if you can go the web-
api route) we also have a new importer located at /api/23/metadata,
which does a much much better job at these kinds of things.

** Changed in: dhis2
       Status: New => Confirmed

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Confirmed

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

Regarding the logic for object matching, it's a bit confusing in the old
importer.. it goes something like this

1) Try to match on UID
2) Try to match on CODE
3) If name == unique, match on NAME
4) if object is orgUnit, also try to match on UUID

This has changed in the new importer, where we currently only allow
matching on UID/CODE, and it has to be explicit (UID is default)

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Confirmed

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

This is strange.. but seems this is only true if preheatCache=false, if
preheating is enabled.. it seems to work as intended.. I will try and
fix it, but not sure what is causing this

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Confirmed

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

Thanks Morten. I will give the /23/ a shot for sure!

As far as the cache preheat, that is a stumper. I turn it off for most of
my imports because with DATIM it is the difference between a 300 second
import and an 800 second import. Thanks for looking into this.

*Timothy Harding*
Sr. Systems Analyst, BAO Systems
+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype:
hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

···

On Tue, Aug 23, 2016 at 2:28 AM, Morten Olav Hansen < 1614543@bugs.launchpad.net> wrote:

This is strange.. but seems this is only true if preheatCache=false, if
preheating is enabled.. it seems to work as intended.. I will try and
fix it, but not sure what is causing this

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Confirmed

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead
and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=
sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

** Attachment added: "PastedGraphic-1.png"
   https://bugs.launchpad.net/bugs/1614543/+attachment/4726328/+files/PastedGraphic-1.png

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Confirmed

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

Hi Tim

This should now be fixed in 2.23, and 2.24

** Changed in: dhis2
       Status: Confirmed => Fix Released

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Fix Released

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

Perfect I will get this deployed and test it out.

*Timothy Harding*
Sr. Systems Analyst, BAO Systems
+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype:
hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

···

On Thu, Aug 25, 2016 at 1:07 AM, Morten Olav Hansen < 1614543@bugs.launchpad.net> wrote:

Hi Tim

This should now be fixed in 2.23, and 2.24

** Changed in: dhis2
       Status: Confirmed => Fix Released

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Fix Released

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead
and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=
sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions

** Attachment added: "PastedGraphic-1.png"
   https://bugs.launchpad.net/bugs/1614543/+attachment/4727585/+files/PastedGraphic-1.png

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1614543

Title:
  Dry run Alters Data 2.23

Status in DHIS:
  Fix Released

Bug description:
  Hello devs!

  Just found in 2.23 a bug that will alter metadata during a dry run.

  Also, if someone come point me at the documentation for the logic for
  updating existing objects? Right now if a name is the same, it will
  alter the existing code and uid to the incoming code and uid rather
  than erroring out, which to me seems like a bad idea to ever edit a
  UID.

  You can see an example of this here:

  The video is in 4k, so if you have trouble seeing it at 1080p, go ahead and download it from this link.
  https://drive.google.com/file/d/0B9eJ8PZ_4csMd1ZYQnBVb081X1k/view?usp=sharing

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1614543/+subscriptions