-
Notifications
You must be signed in to change notification settings - Fork 135
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
Missing data on CSV File layouts #1288
Comments
So you're saying that these three fields:
Should be removed from the csv? And yeah, I agree they should be cleaned up. |
Not used at all 'cause they are handled differently... So personally I think, they can be removed from the table structure to avoid confusion (or at least this can be documented somewhere). Same applies to some other tables as well.
This is because the fare system has its own tables which use "relationships" to build up the final result. This is the reason you can not see anything related to fares at subfleet table (same applies to some other tables too) |
The Main Hub and Simbrief Name are input on the Screen and saved in the database record but do not appear in the CSV record so you could not really import a Subfleet if you wanted to add these two fields from a CSV |
So actually what missing is the "Hub" and the "Simbrief Type" fields ;) |
What part of the system exports the csv data and what part imports the csv data as I could have a look at fixing this as I am building a PHPVMSGEN system that has all the world airports flights and aircraft types and I am going to filter out by a config -file the raw data I do not need to import and set up a set of CSV files to import to PHPVMS so it is a sort of Virtual Airline Builder for PHPVMS which can help set up a working airline in a very short time and just leave some tweaking by the Virtual Airline later it will save a lot of input by hand so that's why I am worried about the csv file layouts |
|
You should not remove "Fares" field from csv. It works and it is needed. |
So to simplify this; What is missing in csv (needs to be added 'cause effects management import/export);
What is extra / not being used / non-necessary at SubFleets table (which is harmless and can be forgotten forever)
Fares and relationships of them with Subfleets and Flights are a different topic :) |
That is correct , what are the PHP files for the Subfleet import and export , I am good with PHP and once I get the hang of this I can offer to fix the other CSV file code as and when I find something missing (of course it would be noted on here first as some fields are there for a specific reason . So it would be that for now you experts will state like above what needs to be added and what can be removed . I would not remove the fields myself from the database as that can be done prior to the main release as an upgrade to these beta-versions |
It's all in https://github.com/nabeelio/phpvms/tree/dev/app/Services/ImportExport You should also be using the latest dev version, some of the import/export bugs have been fixed. |
Fares should be getting exported from the subfleet, are they not? |
They are being exported and imported, nothing wrong with fares |
Only problem is we still have an open issue ( #974 ) about them @nabeelio
This generates problems when being imported back
|
so this is the code to amend I would remove the fuel capacity gross weight and cargo capacity and add in the Basehub and Simbrief Base-HUB is required type and simbrief is nullable as you do not have to input it |
The other issue has not yet been assigned , so could I not fix this one first and then comment in the other 974 that other fields in this csv have been fixed |
airline,hub_id,type,simbrief_type,name,fuel_type,cost_block_hour,cost_delay_minute,ground_handling_multiplier,fares Fixed it locally on my dev copy as my airline is not live yet |
the code was as follows -: |
What about export ? You should add/remove fields from the export code, so the exported csv has new fields you added and does not contain the fields you removed otherwise the importer will not like the csv :( Also you can send in those changes are "pull requests", posting here as plain text makes following the changes harder. |
The csv file I showed above was the EXPORT from the system so it had the amendments . |
I do not know, I never inserted my name or date in the code as comments. Saw no one doing that too when they send in pull requests. Github offers a nice history (or commits) so you can track your changes (also the owner of the project can see who did what and when etc) if needed. |
The export code references those same fields, so changing in one automatically changes it in the other. You don't need to be assigned anything to send in a pull request, I'll tie it to this issue automatically. You don't need to comment name/date/time or anything, that's automatically tracked by git. |
How do I send in a pull request do I just sen you the php file
… On 26 Aug 2021, at 19:42, Nabeel S. ***@***.***> wrote:
The export code references those same fields, so changing in one automatically changes it in the other. You don't need to be assigned anything to send in a pull request, I'll tie it to this issue automatically. You don't need to comment name/date/time or anything, that's automatically tracked by git.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1288 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFJ7CEBLB5QIX453UVVHEBDT6ZOFRANCNFSM5C3OL7GQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
In Github, you can edit the file directly, and then it will ask you if you want to create a pull request. |
PHPVMS V7 has a nice import feature from csv files but it seems there are considerable differences between the csv files and what you would input on the screen. Does anybody know the reason for this such as the Subfleet table has these fields in the csv but you do not input them all on the screen
those marked with BOLD ITALICS are input on the screen
airline,type,name,fuel_type,cost_block_hour,cost_delay_minute,ground_handling_multiplier,cargo_capacity,fuel_capacity,gross_weight,fares
The others are not input when adding a new Subfleet two inputs MAIN HUB and SIMBRIEF TYPE are available for input but do not show on the csv so that's 6 fields that are not accounted for on the CSV that gets exported or imported and when you look at the 'input/maintain fields on the record
2 airline_id.
3 hub_id
4 type.
5 simbrief_type
6 name
7 cost_block_hour
8 cost_delay_minute
9 fuel_type
10 ground_handling_multiplier
11 cargo_capacity
12 fuel_capacity
13 gross_weight
There is not even a field for Fares in the database record.
Similar errors and omissions are seen on other tables , it seems that either some of these fields are redundant because of the mew structure of PHPVMS 7 and have been initially copied over from PHPVMS 5 . However as PHPVMS is in a BETA state at present there is opportunity to get these csv file layouts sorted out and prune any redundant fields from these tables if they have been moved elsewhere.
The text was updated successfully, but these errors were encountered: