invernyx / smartcars-3-phpvms5-api

The API responsible for connecting smartCARS to phpVMS 5
MIT License
7 stars 7 forks source link

[BUG] - Flight Center - User Created Flights Do Not Append Airline Code #86

Open bryan737dfw opened 1 year ago

bryan737dfw commented 1 year ago

Describe the bug

If a flight is created using the "Create Flight" option, it will create the flight with an invalid airline code if the airline code was not entered as part of the callsign.

If you look at the admin panel in phpVMS, the airline code is the the first 3 characters of the entered callsign and the flight number is either blank of the callsign characters starting at the 4th character.

image

This causes multiple "charter" airlines to show in the admin panel.

image

How do you reproduce this bug?

  1. Go to Flight Center and click "Create Flight".
  2. For the callsign just enter a number, like 927.
  3. Enter the other required flight information and click create.
  4. Go into phpVMS admin and can see the flight added to the schedule and also the multiple charter airlines that appear in the airlines list.

Expected behavior

The airline code should be appended to the front of the callsign when a new flight is created. So if the airline code of the user session is "NBL" then if they entered "927" then the callsign would be saved as "NBL927".

I think part of the user confusion with this current behavior is that in SC2 you just entered the flight number portion (not the airline code) when creating a flight.

Screenshots

No response

Operating system

Windows 10 22H2

Community airline

Noble Air

smartCARS Version

0.12.0

Plugins installed

Chat 0.11.0, Flight Center 0.10.1, Flight Tracking 0.12.0, Logbook 0.10.1, Map 0.10.0, SimBrief 0.10.1

Additional context

No response

GenericNerd commented 11 months ago

This is an API issue, I have moved this issue to that repository.

GenericNerd commented 11 months ago

This would have to be a toggleable setting in the way that charter flights are done for phpVMS 5/7 specifically, as we always create an airline with the first 3 characters of the flight given. If you type 3 numbers, that will be the callsign of the airline.

This may need to be pushed outside of 0.3.5, since it can be fixed through the user adding the 3 characters, but there will still be airlines with the name "Charter" displayed.

bryan737dfw commented 11 months ago

In SC2, when a pilot created a "charter" flight, they only entered the numeric flight number... it specifically specified this.

SC2 will not let you enter anything but a numeric flight number for a charter: image

image

So, in SC3 when the users do the behavior to which they are accustomed from years of using SC2, this creates a bunch of new "airlines". This makes things messy on the backend because there are now a bunch of disabled "charter" airlines in the admin panel. There does not appear to be a way to remove these entries once they are created.

Since the user logs into the airline when logging into SC3, maybe if the callsign does not begin with the airline code then the callsign value can have the airline code added to the front of the callsign? Or, since the create charter is a different screen from the bid flight, just allow numeric flight numbers to be entered and append the airline code as was the case in SC2.

bryan737dfw commented 6 months ago

Checking to see if there is any update on this issue since it was opened 6 months ago.

RandyD59 commented 1 month ago

I'd like to add in what we see and possible suggestions. I've attacthed a word doc with the info.

Since I dont see this being fixed in the best way just via only an API change, and that it is adding unwanted items to our database I will also submit a support ticket.

SC3 Create Flight Charter Problem.docx

BossOfGames commented 2 weeks ago

I'd like to add in what we see and possible suggestions. I've attacthed a word doc with the info.

Since I dont see this being fixed in the best way just via only an API change, and that it is adding unwanted items to our database I will also submit a support ticket.

SC3 Create Flight Charter Problem.docx

Good analysis.

This has been fixed in the phpVMS 7 API with a special set of options. For feature parity, I can bring that functionality over to phpVMS 5. https://github.com/invernyx/smartcars-3-phpvms7-api?tab=readme-ov-file#charter-flights

I would need to do something regarding the default settings, but this could probably be done with ease.