Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

remove bad and duplicate forms #285

Open
huangyz0918 opened this issue Jul 28, 2019 · 6 comments
Open

remove bad and duplicate forms #285

huangyz0918 opened this issue Jul 28, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@huangyz0918
Copy link
Contributor

huangyz0918 commented Jul 28, 2019

Problem description

I noticed this issue when I'm testing the bluetooth feature, I don't know where this issue comes from, is it comes from the bluetooth approach or it's a common issue? Sometimes I can notice we have the duplicate form in our application, but in the ODK Collect, we can only see one.

I think we can add a check to our recycler view, to remove the duplicated items, we can add a method to check every time when we updated the list.

Apart from the duplicate ones, I can see if we have some forms without root element, which means it is invalid, we should remove them in the list (the same responses like ODK Collect).

Screenshot_20190710-172158.png Screenshot_20190710-172205.png

You can see we have two all-widgets in the skunkworks-crow but only one appeared in ODK Collect.

Steps to reproduce the problem

  • transferring forms using bluetooth
  • currently I can notice only all-widgets from has this issue, but I think it is a common issue, we should add a common check in our list view.

Expected behavior

The items in the list are normal.

Other information

Things you tried, stack traces, related issues, suggestions on how to fix it...

@lakshyagupta21
Copy link
Contributor

Apart from the duplicate ones, I can see if we have some forms without root element, which means it is invalid, we should remove them in the list (the same responses like ODK Collect).

That validation is done in Collect and skunkworks-crow is not expected to do such validation. We add the new entries of forms received directly in forms table of collect. And if there is an entry already present with same form name and form version then we skip downloading the form from the sender.

I think we can add a check to our recycler view, to remove the duplicated items, we can add a method to check every time when we updated the list.

There should not be a duplicated item, first, debug this and make sure that no duplicate entry is made both in forms.db as well as forms directory because those two has to be in sync. And if there is no entry then there is a problem with the recycler view implementation of ours.

@huangyz0918
Copy link
Contributor Author

I have no ideas to address this problem, it appears just making no sense. I research that for a while but I could not reproduce it sometimes. Let's mark it as a bug and see other's ideas. @lakshyagupta21

@opendatakit-bot label "bug"

@getodk-bot getodk-bot added the bug Something isn't working label Jul 30, 2019
@huangyz0918 huangyz0918 removed their assignment Jul 30, 2019
@huangyz0918
Copy link
Contributor Author

How to reproduce this issue,

  • reset your sender and receiver, select a blank form and send it to receiver.
  • confirm your receiver received the selected form.
  • open the ODK Collect in your sender, and fill an instance for the blank form.
  • send the instance to the same receiver.
  • there are two duplicate forms in the receiver.

@chidauri
Copy link

@opendatakit-bot claim

@getodk-bot
Copy link
Member

Hello @chidauri, it looks like you've currently claimed 2 issues in this repository. We encourage new contributors to focus their efforts on at most 2 issues at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

@ajay-prabhakar
Copy link
Contributor

@huangyz0918 I am unable to reproduce this issue, can you check once and let me know thanks ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants