← Back to team overview

dhis2-devs team mailing list archive

[Bug 1368191] [NEW] Attributes and Data Entry form not loading in Tracker Capture

 

Public bug reported:

Hi Devs,

I am having issues loading attributes for a defined program. The program
assigned to the org unit shows but when I select Register only the
Report Date comes up. There are no errors in the log but the Console
output is below:

TypeError: Cannot read property 'id' of undefined
    at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:437:62
    at Array.forEach (native)
    at Object.forEach (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:322:11)
    at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:436:25
    at wrappedCallback (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11046:81)
    at https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11132:26
    at Scope.$eval (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:12075:28)
    at Scope.$digest (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11903:31)
    at Scope.$apply (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:12179:24)
    at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:417:36 angular.js:9509(anonymous function) angular.js:9509(anonymous function) angular.js:6950wrappedCallback angular.js:11049(anonymous function) angular.js:11132Scope.$eval angular.js:12075Scope.$digest angular.js:11903Scope.$apply angular.js:12179(anonymous function) services.js:417forEach angular.js:322(anonymous function) services.js:411k jquery.min.js:2l.fireWith jquery.min.js:2request.onsuccess dhis2.storage.idb.js:264

The problem seems to be here:

angular.forEach(program.programTrackedEntityAttributes, function(pAttribute){
                    var att = attributes[pAttribute.attribute.id];
                    att.mandatory = pAttribute.mandatory;
                    if(pAttribute.displayInList){
                        att.displayInListNoProgram = true; 

I am using Version:
2.16
Build revision:
16410

Many thanks.

Kind regards,
Busoye

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

Title:
  Attributes and Data Entry form not loading in Tracker Capture

Status in DHIS 2:
  New

Bug description:
  Hi Devs,

  I am having issues loading attributes for a defined program. The
  program assigned to the org unit shows but when I select Register only
  the Report Date comes up. There are no errors in the log but the
  Console output is below:

  TypeError: Cannot read property 'id' of undefined
      at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:437:62
      at Array.forEach (native)
      at Object.forEach (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:322:11)
      at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:436:25
      at wrappedCallback (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11046:81)
      at https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11132:26
      at Scope.$eval (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:12075:28)
      at Scope.$digest (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:11903:31)
      at Scope.$apply (https://dhis.leprosy.org/dhis-web-commons/javascripts/angular/angular.js:12179:24)
      at https://dhis.leprosy.org/dhis-web-tracker-capture/scripts/services.js:417:36 angular.js:9509(anonymous function) angular.js:9509(anonymous function) angular.js:6950wrappedCallback angular.js:11049(anonymous function) angular.js:11132Scope.$eval angular.js:12075Scope.$digest angular.js:11903Scope.$apply angular.js:12179(anonymous function) services.js:417forEach angular.js:322(anonymous function) services.js:411k jquery.min.js:2l.fireWith jquery.min.js:2request.onsuccess dhis2.storage.idb.js:264

  The problem seems to be here:

  angular.forEach(program.programTrackedEntityAttributes, function(pAttribute){
                      var att = attributes[pAttribute.attribute.id];
                      att.mandatory = pAttribute.mandatory;
                      if(pAttribute.displayInList){
                          att.displayInListNoProgram = true; 

  I am using Version:
  2.16
  Build revision:
  16410

  Many thanks.

  Kind regards,
  Busoye

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


Follow ups

References