[Bug 1569793] [NEW] attribute unique in program not working

Public bug reported:

When using the "unique in program scope" option for attributes,
registering users will cause a crash on the server side.

The workaround is to use other uniqueness scopes.

In the way the calls is made, the registration of the Tracked entity(and
the attribute values), happens before enrolling this tracked entity in a
program. The first call(registration) fails because the program is not
submitted. The program cannot be submitted until the second
call(enrollment) is made.

** 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/1569793

Title:
  attribute unique in program not working

Status in DHIS:
  New

Bug description:
  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.

  The workaround is to use other uniqueness scopes.

  In the way the calls is made, the registration of the Tracked
  entity(and the attribute values), happens before enrolling this
  tracked entity in a program. The first call(registration) fails
  because the program is not submitted. The program cannot be submitted
  until the second call(enrollment) is made.

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

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

** Changed in: dhis2
     Assignee: (unassigned) => Abyot Asalefew Gizaw (abyot)

** 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/1569793

Title:
  attribute unique in program not working

Status in DHIS:
  New

Bug description:
  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.

  The workaround is to use other uniqueness scopes.

  In the way the calls is made, the registration of the Tracked
  entity(and the attribute values), happens before enrolling this
  tracked entity in a program. The first call(registration) fails
  because the program is not submitted. The program cannot be submitted
  until the second call(enrollment) is made.

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

The problem is during registration we are sending only attributes. When
some of these attributes have uniqueness scope per program defined, the
server doesn't know against which program to check the uniqueness. The
only point we send program information is during enrollment. However,
enrollment requires UID of tracked entity instance - which is not yet
registered in this case.

We either change our TrackedEntityInstance data model so that it becomes
possible to send program information at the time of registration or
change enrollment end point so that it becomes possible to do both
registration and enrollment at the same time.

···

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

Title:
  attribute unique in program not working

Status in DHIS:
  New

Bug description:
  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.

  The workaround is to use other uniqueness scopes.

  In the way the calls is made, the registration of the Tracked
  entity(and the attribute values), happens before enrolling this
  tracked entity in a program. The first call(registration) fails
  because the program is not submitted. The program cannot be submitted
  until the second call(enrollment) is made.

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

As we are not fixing this before 2.24, the options will be hidden. Be
sure to revert revision 23470 when the support is implemented.

** Description changed:

  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.
  
  The workaround is to use other uniqueness scopes.
  
  In the way the calls is made, the registration of the Tracked entity(and
  the attribute values), happens before enrolling this tracked entity in a
  program. The first call(registration) fails because the program is not
  submitted. The program cannot be submitted until the second
  call(enrollment) is made.

···

+
+ Be sure to revert revision 23470 when the support is implemented.

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

Title:
  attribute unique in program not working

Status in DHIS:
  New

Bug description:
  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.

  The workaround is to use other uniqueness scopes.

  In the way the calls is made, the registration of the Tracked
  entity(and the attribute values), happens before enrolling this
  tracked entity in a program. The first call(registration) fails
  because the program is not submitted. The program cannot be submitted
  until the second call(enrollment) is made.

   Be sure to revert revision 23470 when the support is implemented.

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