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

Upload functionality on data entry forms #85

Open
dannyparsons opened this issue Jun 7, 2018 · 8 comments
Open

Upload functionality on data entry forms #85

dannyparsons opened this issue Jun 7, 2018 · 8 comments
Assignees

Comments

@dannyparsons
Copy link

@maxwellfundi @Patowhiz in ucrFormDaily2 I added UploadAllRecords which creates observationinitial records for each record in the form. The actual lines to add the records is commented out until the issues with EF model and database are fixed but the functionality is there.

I don't think this has been done for the other forms yet? It is quite simple to do but needs careful detail to populate the fields correctly, I used the original form to understand how the fields should be populated, and you can now look at ucrFormDaily2 to see how I did it. I suggest this does not wait until the EF model has been modified before starting because it can take time. If this has been done for all forms then when the model is updated we just need to uncomment the add lines to be able to test the upload.

Can you get started on this? Let me know if you have any questions.

@maxwellfundi
Copy link

Okay, we will look at this after we fix the current issues hopefully for tomorrow skype call

@dannyparsons
Copy link
Author

This doesn't need to be done before your call because it doesn't affect functionality until the model is updated.

@mhabimana
Copy link

mhabimana commented Jun 22, 2018

@africanmathsinitiative/climsoft . Can you please let me know how far have you gone with the "Upload button" functionality because I am testing the branch,Dev published by Patrick and this button is not active?This is the error I am getting when I click on upload on Form Hourly (see below). However,this button is not active on formDaily2
image

@Patowhiz
Copy link

@mhabimana @smachua what should happen to the observationinitial if someone deletes a record on say form2Daily and uploads again. Should all the records of that form be cleared in the onservationinitail table and inserted afresh or just be left. For example I had 2 records in formdaily2, of the same station(e.g BINGA) but different elements (e.g Temp Daily Max and Temp Daily Min ). I click on upload. Which means observationinitial table will now have values for these 2 records. Then I delete the one of the record in the form2Daily(the one for element Temp Daily Min) and I click on upload again. Should the values for Temp Daily Min be deleted in the observationinitial table?

@mhabimana
Copy link

mhabimana commented Jul 11, 2018

@Patowhiz :Thanks,when entering data in different forms (e.g. Form Daily2) all the data entered are stored in Form Daily2 Table. Once the upload button is clicked,all the contents of this form goes to observationinitial table with QC status 0 (e.i: they have not yet going through QC process) of course,the contents of form will not be deleted in the form daily2 table ( climsoft V3.1 had an option to tick if you want to upload the content of the initial database into the intermediary database and delete the contents of the initial or leave the content).By clicking on the upload for the second,third,fourth,etc times,the contents of the form Daily2 overwrites (updates) the content of the observationinitial. Note that once a record is pushed into the observationinitial,through the upload action, it stays there unless it is deleted or modified (updated). Hope I answer your question.

@Patowhiz
Copy link

Aha! I get the overwitting bit. The bit where I'm a bit confused is, what happens to the corresponding record that I have deleted in form2Daily. For instance I have 10 records in form2Daily then I click button upload. Then I go ahead and delete 5 records, which means I now have 5 records remaining. Then I click on update the second time. I know the 5 records will overwrite their values in the observationinitial but what should happen to the other 5 which we have deleted in form2Daily? Should we just delete them as well or ignore and leave them.

@mhabimana
Copy link

mhabimana commented Jul 11, 2018

@Patowhiz : Form Daily2 hold data temporarily.The most important button is the upload which transfer data into the observationinitial for further processing.That means,after clicking on the upload,you can decide to delete the contents of the formDaily2 table or leave these,this will not affect observationinitial contents.

@Patowhiz
Copy link

Okay thanks I now understand

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

No branches or pull requests

4 participants