Hi All, Its my first time here please excuse me if am missing out some steps/introduction before asking my question.
I have recently updated to DHIS2 2.35 and am having some unexpected behavior. I have a set of Program Indicators that calculate score for each section of my data entry form (event). Before upgrade it was working perfectly but now, as you score (each question weight 2 points), then PI seems to concatenate the scores instead of adding them. (for ex, if you score 2 pts for the 1st and 2 pts for the 2nd and 2 pts for the 3rd, the result should simply be 6. Instead the result is being 222)
If anyone has uncounted this, I will highly appreciate their help.
Hi @Fraka1 we’re also testing out 2.35 on our side; haven’t seen what you’re talking about here, but will take a more concerted look.
Form first thoughts, feels like perhaps the upgrade turned your DEs into string values instead of integers, and thus “X” + “Y” becomes a request to put them together vs. add together. Probably what you’ve already surmised. Perhaps the DEs aggregation/format being manipulated can solve your issue though?
@Fraka1 would be great to have some screenshots with DE and indicators. Then we will try to help on what is really going on.
Sure, here are some.
This shows how my PI looks before starting answering questions (I think its supposed to be just 0 to begin with, not 00. And sometimes when I reload it becomes 0000), Sometimes this behavior changes and instead of adding zeros after, it just concatenate.
After answering 3 questions and score 6 points (2 for each), the PI score becomes 600 instead of 6
After fully answer the whole section (8 questions), the PI becomes normal and display the real sum
Hi @Matthew_Boddie, I have checked that and its all good. Normally its behaving like this (I have shared some screenshot) but to clarify, at the end it always gives the correct answer, which I think means that DEs are set good.
The problem arise in the process (when you are scoring as you answer questions). Basically, when u get question 1 correct you auto get 2pts, then 2nd question that ld make it 4pts and 3rd ld make it 6pts.
(in my case, when u score the 1st question you get 2, the second it becomes 22 and on the third 222, BUT when you are done answering the whole section of 8 questions, the score become 18 as normal)
This morning when I logged in to answer this thread, the above behavior had changed. Now instead of concatenating its adding 2 zeros. when u score the 1st question you get 200, the second it becomes 400 and on the third 600, BUT when you are done answering the whole section of 8 questions, the score become 18 as normal.
Any idea of what I might be doing wrong here? Thx
After completing the section:
Actually @Fraka1 I can reproduce your error in a slightly different way. With an event program, in the capture app, I am seeing a program rule trigger a warning if 2 values sum to greater than 8 appear.
The Program Rule Expression:
X + Y
The error triggers when values X=1 and Y=0 are entered, and not when values X=0 and Y=1 are entered. I’m going to write up a Jira ticket on this error (happening at least in 2.34.2 and 2.35.0, from what I know) and reproduce it in play. Have you also taken these steps?
cc @christos gonna tag you here, if that’s alright, just because you’re a superstar and helped me out with some specific things already!
@jillianberkowitz tagging so you know this is a “known” issue as we test.
@Fraka1 Found a ticket that seems to identify your issue.
Lets spread the word of this problem, and perhaps we can get it included quickly. I know that @phil and his team are working on a sprint for a patch for 2.35.1 presently!