Skip to content
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

[#3168] - assign datapoints to assignments by name [no api included yet] #3366

Merged
merged 13 commits into from
Jan 28, 2020

Conversation

marvinkome
Copy link
Contributor

@marvinkome marvinkome commented Dec 19, 2019

Currently all data are stored in memory and not yet connected to the API.

Screenshots (if appropriate)

datapoints

Reviewer Checklist

  • Added an explanation about the work done
  • Connected the PR and the issue on Zenhub
  • Added a test plan to the issue
  • Updated the copyright header (when relevant)
  • Formatted the code
  • Added a documentation (if relevant)
  • Added some unit tests (if relevant)

@marvinkome marvinkome requested a review from muloem December 19, 2019 10:40
@muloem muloem requested review from valllllll2000 and removed request for muloem January 21, 2020 08:26
@marvinkome marvinkome requested a review from muloem January 23, 2020 10:50
@valllllll2000
Copy link
Contributor

The code Looks good to me but I have seen there are lost of Codacy errors https://app.codacy.com/manual/Akvo/akvo-flow/pullRequest?bid=15721359&prid=4706082&utm_campaign=new_commit&utm_medium=Email&utm_source=Internal&
My knowledge of Javascript does not allow me to tell if they are legit or not but @marvinkome I have invited you to that project in case you want to check them out.

@marvinkome
Copy link
Contributor Author

@valllllll2000 they look more like repetitive formatting problems.

Copy link
Member

@muloem muloem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When searching for datapoints, I see that its only possible to search for the entire datapoint name and not partially. I recall the implementation was supposed to search for datapoints based on partially matching the display name, no? @stellanl actually implemented that in #3343

@marvinkome
Copy link
Contributor Author

marvinkome commented Jan 24, 2020

True. Forgot it was implemented. I'll update #3398 to match that. 👍🏼

@marvinkome marvinkome requested a review from muloem January 27, 2020 10:39
Copy link
Member

@muloem muloem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So as a general comment, try to think of the datastructure that is relevant.. in this case the relevant one is the DataPointAssignment which contains the surveyAssignmentId, deviceId and the list of datapoints that are assigned to a particular device. The DataPointAssignment has a once to one correspondence with a device for each SurveyAssignment.

The code we are trying to write is operating on that datastructure. We enter a SurveyAssignmemt and in there when we select a device, we then start to manipulate a DataPointAssignment that is attached to that SurveyAssignmemnt.

With each datapoint that we select, the manipulation is to add or remove a datapointId top the list of ids in the DataPointAssignment. This basic idea should come through when reading the code. So in the code for instance, there should be a DataPointAssignment.

@marvinkome marvinkome requested a review from muloem January 28, 2020 14:20
@marvinkome marvinkome merged commit 02dcf25 into develop Jan 28, 2020
@marvinkome marvinkome deleted the issue-3168/assign-datapoints-by-name branch January 28, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants