Open lorerod opened 1 year ago
cht-core version: 4.1 cht-android version: v0.8.0-5
Tester | Phone details | Android System WebView version | Android OS version | APK | Results | Notes |
---|---|---|---|---|---|---|
Bede | ||||||
Lorena | Samsung Galaxy J7 | 8.1.0 | android-v0.8.0-5-unbranded_test-xwalk | Failed | More details about the test here | |
Tatiana | Samsung Galaxy A01 | 110.0.5481.65 | 10 | android-v0.8.0-5-unbranded_test-webview | Passed | More details about the test here |
Details about the tests performed for this ticket.
NOTE: I saw some weird things related to date, for example, the Phone number
and Alternative phone number
fields are not shown if the Date
radio button is selected, I need to select the Current date
option to see them. I am adding this just as extra information, because I think it is related to the issue related to DOB that was raised already in this document
Details about the tests performed for this ticket.
Trying to create a Household using Android 9 and I see the same behavior that Lorena reported in the previous comment
@tatilepizs Can you please check if there are any feedback documents submitted? If not, can you please submit a feedback doc immediately after you see this error and then sync up and share the contents of the feedback doc?
@dianabarsan the feedback document was created after the failure. Here it is.
Sharing the relevant bit here:
Failed during the form \"contact:clinic:create\" rendering : [\"FormLogicError:
Could not evaluate: if(selected( ../contact_dob_method,'calendar'),
../dob_calendar, concat(format-date-time(today(),\\\"%Y\\\") -
/model/instance[1]/data/contact/age ,'-',format-date-time(today(),\\\"%m\\\"),'-',format-date-time(today(),\\\"%d\\\")) ),
message: globalThis is not defined
Thanks you so much @tatilepizs for the very quick reply!
This points to openrosa-extensions referring to globalThis
.
globalThis
(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) was added in Chrome 71
@dianabarsan, @jkuester is there a known workaround for this error?
@dianabarsan @tatilepizs adding the logs for Edit and Create Person Edit Person:
Failed during the form \"contact:person:edit\" rendering : [\"FormLogicError: Could not evaluate: format-date-time(today(),\\\"%Y\\\") -../age_years, message: globalThis is not defined\
Create Person:
Failed during the form \"contact:person:create\" rendering : [\"FormLogicError: Could not evaluate: format-date-time(today(),\\\"%d\\\"), message: globalThis is not defined\
I'm tempted to try out a polyfill, just to see if there are further errors. I picked one option from this guy's post an pushed it to a branch
What crazy person added globalThis
to OpenRosa????
Son of a..... :facepalm:
I'm tempted to try out a polyfill,
Another option is to patch openrosa to remove that line. At the time of the polyfill suggestion, I thought that line was critical in some way, but based on the commit message it might not be. So a patch will be less risky. @jkuester is that something that can be done easily?
Thank you @dianabarsan for all your help!
Trying Diana's branch 4.1.x-globalthis, and Android 9 (xwalk apk) the problem was fixed and all the forms worked fine.
Regarding patching OpenRosa, I don't think there is anything in particular that would complicate the patch. @dianabarsan noted, there is no functional effect to reverting that particular line to how it was before globalThis
. Currently we are not patching anything in OpenRosa, but there is no reason we cannot add this to the list.
Another option worth weighing is just adding a custom implementation of format-date
that would override the OpenRosa one. (But that would probably be harder than a patch).
Another option worth weighing is just adding a custom implementation of format-date that would override the OpenRosa one. (But that would probably be harder than a patch).
I agree, I had thought about it as well but considered it the riskiest of all options.
Exploratory testing of creation of people and places.
The hierarchy is currently