BMMRO-tech / BMMRO

MIT License
3 stars 5 forks source link

Export Trip & Logbook information to MS Access DB #511

Open Rodrjen opened 4 months ago

Rodrjen commented 4 months ago

Context As a user I want to manually export trip information and logbook entries from the Firebase database to the MS Access database, so that I can maintain a centralised repository of data and utilise MS Access functionalities for analysis and reporting purposes.

In-scope

Out-scope

Scenarios Scenario 1: Exporting Trip Information and Logbook Entries GIVEN I have updated the script to export the trip and logbook entries available in the the Firebase database, WHEN I initiate the export process, THEN the system retrieves all trip details and logbook entries that has the status "ended" from Firebase, AND generates a CSV file named "logbook.csv" containing all fields for the logbook table, AND hydrophone comments are concatenated with logbook comments, AND if GPS mark information is available, it should be added to the comments.

Scenario 2: Trip with status "exported" GIVEN I have already exported a trip WHEN I visit the "Trip Summary" page of this trip THEN I see on the top of the page the following message "This trip has been exported" AND the "+New" button in the logbook section is not present anymore

Acceptance Criteria

  1. The export process retrieves only trip information and logbook entries that has the status "ended" from the Firebase database.
  2. All the trip's and logbook values are correctly mapped in the MS Access DB
  3. A Trip's time value is the first time-entry of a logbook
  4. A CSV file named "logbook.csv" is generated as the output of the export process.
  5. The CSV file contains all fields for the logbook table.
  6. Hydrophone comments are concatenated with logbook comments in the CSV file.
  7. If GPS mark information is available, it is added to the comments in the CSV file.
  8. Once a trip has the status "exported" there is a message in the "Trip Summary" page of that specific trip informing the user that the trip has been exported and cannot be edited in the app
  9. Once the trip status is "exported", the "+New" button is no longer visible in the Logbook section
  10. Update README file in the export-script folder