-
Notifications
You must be signed in to change notification settings - Fork 3
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
Generate Excel for Maintenance report #41
Comments
Negative TNI is caused by the TTNI being set incorrectly, either through user error / not understanding what that value is for or through the TTNI not being updated after an inspection has been completed. For the specific aircraft in that report you can see that their TTNI is set to 99, 100, or 50, which could be users thinking that they were supposed to enter the TNI in the TTNI field as 100 & 50 are the inspection intervals for a lot of aircraft. We could probably help prevent that error from happening in the future by improving the language used on those fields to make it more explicit what they are for and how to use them (although there's still the problem of TTNI not being updated after an inspection all of the time). |
The report really contains multiple reports. In CSV that could not be what we want. I'm looking at ways to generate an Excel compatible file from the app and attach it next to the pdf in the email. Otherwise, I'll be looking at generating multiple csv files and attach them to the email. Also, I'm looking into splitting the generation of the report from the sending of email. My goal would be for the report generator to be able to generate both pdf and csv. Another option would be to just generate csv/excel. Any needs for the pdf? If not, we could just remove that. Reports in the PDF:
|
About TTNI and TNI having wrong value. Any idea to clarify the expected values? Maybe we should create a new issue for that. |
Found a package on github to create Excel file on iOS/macOS called ExportExcel. |
A bit awkward... I had to star my own report for ExcelExport to show up in Swift Packages. |
@huguesf done: #43. I don't have any specific ideas because I don't have the application open in front of me, but I'll see if I can get a hold of the old iPad we used to use for the CFS so I can play around with the app on that and come up with some ideas. |
@kirvanp, in the DEBERT example report, the section gliding centre NATIONAL REPORT STATS has a total line which does not balance with the numbers shown above the total line: In the next example - that I made up from automated tests, there are 7 flights, but the total only shows 6. To get there, I created a flight for the 7 towplane sequences. It also shows only 2 "visible" cells under Tow Aircraft Flights, and 6 "visible" cells under "Hours". I try removing the towplane sequence named "Tow" (not the "tow course" sequence), then another cell that become visible next to TOW, but it shows 0 (zero) - normal since there is no more flight for that sequence. This is the result: Notice that I corrected the unbalanced html tags, but does not seem to be related to what I describe above. The maintenance report section when 7 flights (one per possible sequence) is created: So, I wonder what is "normal" behavior, and what's not? Is that section is even used? People from DEBERT do not seem to find any issue with that. What is you opinion? |
…mDate with the goal to extract the code to generate the report from the code to gather the data. Generation through tests of both version of StatsReportFromDate. (todo: I can't see the schema for the automated tests from other computer when I pull the branche. Where are those schema??)
…dron number for the different cadet. This makes it easy to differentiate between them in the report.
…tGeneratorTests.testStatsReportFromDateIncludeAircraftInReport to view a complete report.
…ame order. (both version of the report) Misc. modification to the testing code. -- may still have a small issue with package manager... need to add the Package.resolved file to GitHub.
…string (ie #FFFFFF or #FFF or #FFFFFFFF) Added a first draft of the ExcelStatsReportFromDate generator (with corresponding protocol).
…variadic parameters cannot be passed down to other functions, and was needed to implement param with default value at protocol level). Changed parameters with default value to overload with protocol extension, needed to use protocol when changing implementation of generator.. first draft for ExcelStatsReportFromDateGenerator. Now need to modify both generator to do the complete job from generating the report and the file to attach (HTML -> PDF or Excel). few options: 1- keep the HTML to PDF conversion outside the report generator (the conversion need UI which seems to be incompatible with UnitTesting) 2- use call back instead of returning a string (allow for any intermediate process) 3- remove the HTML and HTML to PDF processes since that might not be necessary anymore once we can generate and attach an Excel file. (or a combo of few above options)
…sReportFromDate(for). Still missing cell merged down.
…sses. Removed from Formater classes all report parameters. They are now reusable classes for any reports. Moved the StatsReportFromDate (version with Formater) in its own class.
…now include generic formatters for Html and Excel file. Also changed "formater" to "formatter".
… to synchronize packages between developers.
…g to completely move to the newer version that takes a formatter.
…include a way to test it from the simulator (via ActivityViewController). This is incomplete. Still need to fix the send by email with multiple attachment. Also added a way to generate content and get result using an handler function (instead of a delegate class) - see Formatters.swift.
…nd distribution. WARNING!! This version does not work with iPad simulator for an unkown reason related to how Activity work.
… of yyyy-MM-dd HH:mm:ss : file.function#lineNumber : message Implemented the new way to create StatsReportFromDate for both site and region. Ensure the CompletionHandler is always called even if an error occurs (no output) during htmlFormatter.generateResult. Ensure to keep the generated PDF url instead of the HTML source. Keep instance of the pdf generator, the activity and the MFMailComposeViewController until the report processing complete; fix the bug with the activity or email popup not showing or the app freeze. Fix the subject for the Region Stats Report.
…lmost the same code; moved it to the report param structure.
Related to #28
... so that they can input those numbers into what??
Final TTSN: Total Time Since New
TNI : Time to Next Inspection
TTNI : Total Time of the Next Inspection
Issues per glider per day (instead of only per glider). Confirm with ETS how it is filled.
Why are there negative TNI numbers?
What is the purpose of having the number of flights on the top of the report? Could we export total flight / day / glider instead of a grand total? Does the total of Tow plane flights excluded?
Debert-Stats-Report-17-Jul-18-17-Jul-18.pdf
The text was updated successfully, but these errors were encountered: