-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node position inclusion in audit log path is inconsistent for field lists #3126
Comments
I'd bias to cleaning this up so there's less visual noise. Yes. we break downstream tools, but
|
I agree with @yanokwa and think we can fix it. It shouldn't be very risky, it was added just in the latest version. |
An analysis tool that wants to link the audit results to the question definition needs to do so. Also consider that if we make a change now, folks who have ongoing data collection will have audit files with inconsistent names for the same question. e.g. if you do some kind of aggregation over
Only logging a question that is in a field list group is new. That would be |
Unfortunately I think we have to address this. Martijn was being generous when he said "that sounds intriguing and surprising" about the @yanokwa, is there a reasonable way to communicate this change to users? Or do you think we just do it? I seem to remember that analytics for audit logging have been removed. I suggest that we add them back in since it's an area that has been actively evolving and having analytics helps us make better decisions. |
I think we should proceed with this change because the longer we wait, the more painful it is. I wish we had a better way of communicating this change to folks, but we don't. The breaking change only affects a small number of people and it's on the analysis side of things. If folks run into problems, they can file a support issue and we can help fix their scripts. Also, we'll do a beta and we've been reminding folks to try betas to make sure they see breaking changes. |
I investigated the issue yesterday and my conclusion is that it's not possible to handle it on our (Collect) side...
apart from removing the last [1] what we do, we are not able to go through such string and tell which node position should be removed because it's not a repeatable group. If we really want to fix the issue we would need to do that in Javarosa adding those indexes [x] only for repeatable groups. I don't know why they are added in all cases where it's always [1] @lognaturel Any thoughts? You think we should fix it in Javarosa? |
Yes, I agree that it needs to be done on the JR side. As a first step, it would be good to do a quick exploration to see whether a method that does what is desired already exists. I don't think so but it's worth a check. And if not, my initial sense is that It would likely also be possible to do in |
Hello @grzesiek2010, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 5 days. If you've decided to work on something else, simply comment Thank you for your valuable contributions to Open Data Kit! |
Software and hardware versions
Collect v1.22
Problem description
With the addition of change tracking for the audit, there are now events logged for questions in field lists that have value changes. When the field list is first logged, the field list node path looks something like
/data/my-field-list
. However, when there are changes to values in the field list, their paths include an index after the group and look like/data/my-field-list[1]/my-field
.That's because position predicates are trimmed off terminal nodes but not any others.
In general, it's unexpected to have indexes in the case of anything other than repeats since there can't be two nodes of the same name. It's particularly visible in the case of field lists because of the inconsistency.
Steps to reproduce the problem
Fill a form with groups and track changes turned on such as https://docs.google.com/spreadsheets/d/1CItY6bdAeEYPVx8CxB_e4jKF2IkZfrDQ4X3tac94TYQ/edit#gid=0
Notice that all groups have position predicates that look like
[1]
after them. For example:/audit-group-multiplicity/g1[1]/g2[1]/g3[1]/q3
. However,/audit-group-multiplicity/g1/g2/g3/q3
would always be sufficient to identify the proper node and is easier for humans to deal with. That's presumably why the final position predicate was trimmed.The thing that is bothersome is
/audit-group-multiplicity/fl1
followed by/audit-group-multiplicity/fl1[1]/q6
.Expected behavior
I'm not sure what, if anything, we should do about this. It has been this way since the audit feature was released. For someone actually using the XPath path to link an audit row to form contents, the two paths are equivalent so it doesn't matter.
For users doing visual inspection, it's just visual noise they can overlook and probably not a big deal.
But for folks who have written scripts to process the audit, changes to the node format would break their tools. Even though the field list inconsistency is bothersome, it's probably easy enough to explain.
I'm inclined not to do anything about this but wanted to think through it and point it out while the release is still fresh.
What do others think? @grzesiek2010 @yanokwa
The text was updated successfully, but these errors were encountered: