dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32790
Re: [Bug 1368191] [NEW] Attributes and Data Entry form not loading in Tracker Capture
Thanks Abyot.
On 12 Sep 2014, at 11:34, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
> It seems the registration has succeeded but not the enrollment. Registration and enrollment are separate things. I will look into the messaging/log to make is more informative.
>
> The commits I just made won't be available in the demo until the next scheduled build. You need to wait some time... or else checkout the source code (r16421) and build it yourself.
>
> ---
> Thank you,
> Abyot.
>
> On Fri, Sep 12, 2014 at 12:16 PM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
> Thanks for the info.
>
> I tried using the demo to enrol on the Child Program but it failed without providing any more detail. Working on my local host, I have enrolled an entity with the profile showing which seems to suggest that the registration was fine but still cannot enter any data for the program stage.
>
> I have two screenshots attached to show you what I am seeing.
>
> Regards,
> Busoye
>
> <Demo Registration Error.tiff>
>
> <Enrolled but not enrolled.tiff>
>
> On 12 Sep 2014, at 11:03, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>
>> Hi Busoye,
>>
>> 1. Custom registration form is not yet possible... will come for 2.17
>> 2. Future dates, yes you are correct current year is sort of the limit. We really couldn't get a sensible boundary there. will make some changes to give more space.
>> 3. not sure I understand 3, that can only happen if the enrollment has failed.
>>
>>
>> ---
>> Thank you,
>> Abyot.
>>
>> On Fri, Sep 12, 2014 at 11:36 AM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
>> Hi Abyot,
>>
>> I have just downloaded the latest 2.16 stable and the enrolment attributes are loading when you select register. A few problems
>> though:
>>
>> 1) Customised tracked entity form does not load on enrolment page. I get the message below from the console when I select Register
>>
>> ReferenceError: data is not defined
>> at http://localhost:8080/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js:176:43
>> at wrappedCallback (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:11046:81)
>> at http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:11132:26
>> at Scope.$eval (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:12075:28)
>> at Scope.$digest (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:11903:31)
>> at Scope.$apply (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:12179:24)
>> at done (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:7939:45)
>> at completeRequest (http://localhost:8080/dhis-web-commons/javascripts/angular/angular.js:8142:7)
>>
>>
>> More details here:
>>
>> //get enrollment attributes and their values - new attributes because of enrollment
>> angular.forEach($scope.attributesForEnrollment, function(attribute){
>> if(!angular.isUndefined(attribute.value)){
>> tei.attributes.push({attribute: attribute.id, value: attribute.value});
>> }
>> });
>>
>> var enrollment = {trackedEntityInstance: tei.trackedEntityInstance,
>> program: $scope.selectedProgram.id,
>> status: 'ACTIVE',
>> dateOfEnrollment: $scope.newEnrollment.dateOfEnrollment,
>> dateOfIncident: $scope.newEnrollment.dateOfIncident ? $scope.newEnrollment.dateOfIncident : $scope.newEnrollment.dateOfEnrollment
>> };
>>
>> TEIService.update(tei).then(function(updateResponse){
>>
>> if(updateResponse.status === 'SUCCESS'){
>>
>> //registration is successful, continue for enrollment
>> EnrollmentService.enroll(enrollment).then(function(enrollmentResponse){
>> if(enrollmentResponse.status !== 'SUCCESS'){
>> //enrollment has failed
>> var dialogOptions = {
>> headerText: 'enrollment_error',
>> bodyText: data.description
>> };
>> DialogService.showDialog({}, dialogOptions);
>> return;
>> }
>>
>> 2) Future date in attribute date data type not possible beyond last month of current year. This works on the old Find/Add Instance module
>>
>> 3) When you add the registration information and click "Save and Continue”, the dashboard still comes up with "Not yet enrolled"
>>
>> Version:
>> 2.16
>> Build revision:
>> 16420
>>
>> Hope this give you bit more detail.
>>
>> Thanks
>>
>> Busoye
>>
>>
>> On 12 Sep 2014, at 10:33, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>>
>>> Hi Busoye,
>>>
>>> Yes it is committed properly :)
>>>
>>> I have checked the demo as well. I can see First name, Last name and Gender in the registration form - it is only these three attributes which are assigned to Child Programme.
>>>
>>> I think the issue is with your cache. Can you clear and try one more time?
>>>
>>>
>>> ---
>>> Thank you,
>>> Abyot.
>>>
>>> On Fri, Sep 12, 2014 at 11:07 AM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
>>> Hi Abyot,
>>>
>>> Thanks for the update.
>>>
>>> I am checking the demo site but I see that this error still persists. If you choose Ngelehun CHC -> Child Program -> Register, the attributes that you get are not from the Program Attributes rather those defined as "Attributes with no Programs". The output from the console is below. I can’t see the build revision but the details are and from the CI I see that the fix was restored earlier this morning.
>>>
>>> Any chance you could see if this was committed properly?
>>>
>>> Thanks
>>>
>>> Busoye
>>>
>>>
>>>
>>> TypeError: Cannot read property 'id' of undefined
>>> at https://apps.dhis2.org/demo/dhis-web-tracker-capture/scripts/services.js:437:75
>>> at Array.forEach (native)
>>> at Object.forEach (https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:322:11)
>>> at https://apps.dhis2.org/demo/dhis-web-tracker-capture/scripts/services.js:436:25
>>> at wrappedCallback (https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:11046:81)
>>> at https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:11132:26
>>> at Scope.$eval (https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:12075:28)
>>> at Scope.$digest (https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:11903:31)
>>> at Scope.$apply (https://apps.dhis2.org/demo/dhis-web-commons/javascripts/angular/angular.js:12179:24)
>>> at https://apps.dhis2.org/demo/dhis-web-tracker-capture/scripts/services.js:417:36
>>>
>>>
>>> Demo site
>>>
>>> 2.16
>>> Build revision:
>>> Build date:
>>> 2014-09-12 08:54
>>>
>>>
>>>
>>> On 11 Sep 2014, at 16:14, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>>>
>>>> Hi Busoye,
>>>>
>>>> A fix is now committed - r16418.
>>>>
>>>> ---
>>>> Thank you,
>>>> Abyot.
>>>>
>>>> On Thu, Sep 11, 2014 at 1:59 PM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>
>>
>
>
References