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

Block aircraft with Simbrief #1213

Merged
merged 11 commits into from
Jun 3, 2021
Merged

Block aircraft with Simbrief #1213

merged 11 commits into from
Jun 3, 2021

Conversation

FatihKoz
Copy link
Contributor

@FatihKoz FatihKoz commented May 28, 2021

Changes aim to have the ability to block an aircraft's usage if it is used to generate a SimBrief OFP.

Unused/Expired briefings will be deleted by cron like before but will now be checked by HourlyCron, so admins can define more precise restrictions for them (and the blockage period of their aircraft)

Owner of the SimBrief OFP will be able to start a flight with acars using that particular aircraft, but other pilots will get an Aircraft Not Available error (similar to Aircraft State check)

To prevent SimBrief OFP packs being marked as expired/unused, during pirep prefile (or save for manual pireps), pirep_id will be saved to SimBrief table along with flight_id.

When a flight is finished (acars: file pirep / manual: submit), flight_id will be removed from SimBrief table as before. Only pirep_id will remain and aircraft will be available for another OFP generation.

Blocking aircraft is tied to a setting under SimBrief group.

Closes #1210

Changes aim to have the ability to block an aircraft's usage if it is used to generate a SimBrief OFP.

Unused/Expired briefings will be deleted by cron like before but will now be checked by HourlyCron, so admins can define more precise restrictions for them (and the blockage period of their aircraft)

Owner of the SimBrief OFP will be able to start a flight with acars using that particular aircraft, but pilots will get an Aircraft Not Available error (similar to Aircraft State check)

To prevent SimBrief OFP packs being marked as expired/unused, during pirep prefile, pirep_id will be saved to SimBrief model along with flight_id.

And when a flight is finished (pirep file), flight_id will be removed from SimBrief model as before. Only pirep_id will remain and aircraft will be available for another OFP generation.
In case a pirep is being saved/submitted with manual entry (but the va is using simbrief effectively) same logic should be applied during save/submit button selection.
Save will act like a pirep prefile , Submit will be pirep file.
Manual pireps, prefiled from a generated simbrief should be checked too. Also pirep.show blade's submit button should provide the same simbrief checks.
Removed null check of pirep_id for aircraft list generation to prevent live flights' aircraft being listed for another ofp generation.
( Active acars flights will have both flight_id and pirep_id at simbrief table)
@nabeelio nabeelio added this to the 7.0.0 milestone May 28, 2021
@nabeelio nabeelio merged commit 17447c6 into nabeelio:dev Jun 3, 2021
@FatihKoz FatihKoz deleted the BlockAircraftWithSimBrief branch June 9, 2021 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update SimBrief model with Pirep PreFile too (and more)
2 participants