-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add a list of datapoints to the device assignment endpoints #3166
Comments
Some other things to consider:
@janagombitova what do you think? |
Thinking out loud:
But:
Considering these questions, I would leave this to a 2nd iteration. But I do believe removing from the device what is unassigned will:
|
A fundamental design decision is whether a data point is assigned to a maximum of one device at a time:
|
@stellanl the expectation is that a data point can be assigned to more than one device. |
Ok, then we can either:
|
Initial implementation: New datastore entity Kind: DataPointAssignment with these fields:
The REST endpoint is /rest/data_point_assignments Also, SurveyAssignment has a new field: In both cases, surveyId is the survey (UI survey, SurveyGroup, not form) that the assignment is for. For the app there is a new endpoint, /assigned_datapoints. See #3167 |
Since we will run a data script #3107 to split any assignments into survey-specific ones, we can modify that slightly to populate the surveyId field at the same time. |
As we are changing the API, and processing all the existing assignments, we could take the opportunity to rename survey to form in both the survey-assignment rest API and the datastore. |
…lect this. Add param checking to POST methods of both assignments.
Issue/3166 add datapoint assignments (Connect #3166)
Is there anything user-visible to test here? |
All linked PRs are merged and released. If this still needs work - please reopen |
As part of the work done under assignments reimplementation #2796, we will enable selection of a list of datapoints that will be assigned to a specific device for monitoring exercises. It means that device will only be limited to downloading those datapoints assigned to it.
This requires reimplementing the backend APIs used to retrieve assigned forms, to also include a list of datapoint IDs so the device knows which datapoints it can actually download.
Some issues to decide:
An alternative would be to include the datapoints when downloading the assignments but this may be a bit problematic if there are loads of datapoints.
Should we implement a completely new endpoint that returns JSON rather than modifying the current API for assignments that uses a rather complicated custom format for returning assignments lists?
@valllllll2000 @stellanl Could you sync and talk about this one?
The text was updated successfully, but these errors were encountered: