Project

General

Profile

Task #19864

Updated by Redmine Admin 3 months ago

In air freight, the **flight information** replaces the ocean concept of **vessel/voyage details**. 

 For Air Clearing: 

 | Ocean Concept | Air Equivalent | 
 |---------------|----------------| 
 | Vessel | Airline | 
 | Voyage Number | Flight Number | 
 | Port of Loading | Airport of Loading | 
 | Port of Discharge | Airport of Arrival | 
 | ETA / ETD | Flight arrival/departure dates | 

 This section helps users know which flight is carrying or has carried the cargo. 

 An Air Clearing File may involve either: 

 * One direct flight, or 
 * Multiple flights where the shipment is routed through one or more transit airports. 

 Example: 

 Flight 1: MRU → DOH | Qatar Airways | QR851  

 Flight 2: DOH → CDG | Qatar Airways | QR039 

 The **Flight Information** section must be designed as a **multi-row grid**, where each row represents one flight leg. 

 # Screen Section 

 ### Section Name: Flight Information 

 This section should appear after the "**Shipment Details**" "Shipment Details" section on the Air Clearing Add/Update screen. 

 # Screen Layout --- 

 The Flight Information section should contain: 

 * Add Flight button `+` 
 * Flight Information grid 
 * Edit action per flight row 
 * Delete action per flight row 
 * Empty grid message if no flight exists 

 Suggested empty message: 

 _No flight information found._ 

 # Flight Information Grid Columns 

 Each row in the grid represents one flight leg. 

 | Column | Description | 
 |--------|-------------| 
 | Seq. No. | Sequence/order of the flight leg | 
 | Airline | Airline name / IATA code | 
 | Flight Number | Flight number | 
 | Departure Airport | Airport of departure | 
 | Arrival Airport | Airport of arrival | 
 | ETD | Estimated Time of Departure | 
 | ETA | Estimated Time of Arrival | 
 | ATD | Actual Time of Departure | 
 | ATA | Actual Time of Arrival | 
 | Cargo Terminal / Handling Agent | Optional terminal or handling agent | 
 | Remarks | Internal remarks | 
 | Action | Edit / Delete | 

 # Add / Edit Flight Popup 

 When the user clicks **Add Flight** or edits an existing flight row, the system should open an Add/Edit Flight popup or inline form. 

 ## Popup Fields Required 

 | Field | Type | Mandatory | Remarks | 
 |-------|------|-----------|---------| 
 | Sequence No. | Auto-number / numeric | Yes | Determines flight order | 
 | Airline | Searchable dropdown | Yes | Search by airline name or IATA code | 
 | Flight Number | Textbox | Conditional | Recommended mandatory if known | 
 | Departure Airport | Searchable dropdown | Yes | May default from Origin Airport of departure | 
 | Arrival Airport | Searchable dropdown | Yes | May default from Destination Airport of arrival | 
 | ETD | Date/time picker | No | Estimated departure Time of Departure | 
 | ETA | Date/time picker | No | Estimated arrival Time of Arrival | 
 | ATD | Date/time picker | No | Actual departure Time of Departure | 
 | ATA | Date/time picker | No | Actual arrival Time of Arrival | 
 | Cargo Terminal / Handling Agent | Searchable dropdown / textbox dropdown/textbox | No | Useful useful for release tracking | 
 | Remarks | Multiline textbox | No | Internal flight remarks | 

 # Functional Requirements 

 ## 1 – Display Flight Information Section 

 The system must display the **Flight Information** section for all Air Clearing Files. 

 ## 2 – Support Multiple Flights 

 The system must allow one Air Clearing File to have **one or more flight records**. 

 This is required because air shipments can be: 

 | Shipment Situation | Flight Records | 
 |--------------------|----------------| 
 | Direct shipment | One flight | 
 | Transit / connecting shipment | Multiple flights | 

 There should be no fixed maximum number of flights. 

 ## 3 – Add Flight Record 

 When the user clicks the Add Flight button: 

 * The Add/Edit Flight popup should open. 
 * The user should be able to enter flight details. 
 * After saving, the flight record should appear in the Flight Information grid. 

 ## 4 – Edit Flight Record 

 When the user edits an existing flight row: 

 * The same Add/Edit Flight popup should open. 
 * Existing flight details should be populated. 
 * User can update allowed fields. 
 * On save, the grid should refresh. 

 ## 5 – Delete Flight Record 

 The user should be able to delete a flight row. 

 When delete is clicked: 

 * The system should ask for confirmation. 
 * If confirmed, the flight record should be removed or soft-deleted based on existing system behaviour. 

 Suggested confirmation: 

 _Are you sure you want to delete this flight record?_ 

 ## 6 – Airline Search 

 Airline dropdown must support search by: 

 * Airline name, e.g.Emirates 
  
 * IATA airline code, e.g. EK 

 Display format: 

 EK - Emirates Airlines 

 ## 7– 3 – Auto-population from Source 

 If the clearing file is created from an existing source, the system should populate available flight information. from: 

 | Source | Expected Behaviour | 
 |--------|--------------------| 
 | HAWB | Populate all available flight legs details from HAWB / File Reference where available | 
 | MAWB | Populate all available flight legs details from MAWB / File Reference where available | 
 | Quotation | Populate airline/routing if available; create one flight row if only one route exists available | 
 | Manual | Leave grid empty and allow blank for user to add one or more flights manually entry | 

 If the source only contains one flight, create one flight row. 

 If the source contains multiple flights, create multiple flight rows in correct sequence. 

 ## 8 4Mandatory Flight Rules Airport Defaults 

 At least one flight record Departure Airport and Arrival Airport should be required before the Air Clearing File is marked as **Completed**. default from Shipment Details: 

 | Flight Field | Shipment Details Source | 
 |--------------|-------------------------| 
 | Departure Airport | Origin Airport | 
 | Arrival Airport | Destination Airport | 

 User may edit if required. 

 ## 9 5 – Date/Time Validation 

 The system should validate logical flight dates: 

 * ETA should not normally be before ETD. 
 * ATA should not normally be before ATD. 

 Suggested warning:  

 

 Arrival date/time cannot be earlier than departure date/time. 

 All other validation existing on the current flight functionality should be taken into consideration for this section also. 

 ## 10 7 – Editable Fields 

 The Flight Information section must follow All flight information fields should remain editable unless the Air Clearing file is Closed or Cancelled. 

 When file status workflow. is: 

 | Air Clearing Status | Flight Information Behaviour | 
 |---------------------|------------------------------| |--------|-----------| 
 | Draft | Add / Edit / Delete allowed Editable | 
 | Completed Awaiting Approval | Add / Edit / Delete allowed, but Editable, on Save Save, status returns is returned to Draft "Draft" and user can send for approval again | 
 | Confirmed | Editable till Standard Invoice has not been issued.    Note that charges can still be added even after Standard Invoice has been issued. | 
 | Closed | Read-only | 
 | Cancelled | Read-only | 

 If the file is **Completed** and the user updates Flight Information, the system must automatically change the status back to: 

 `DRAFT` 

 Suggested Activity Log: 

 `<username> updated flight information for Air Clearing File <CLEARING_REF>; status changed from COMPLETED to DRAFT` 

 ## 11 8 – Save Flight Information 

 When the user saves the clearing file, the system must save all flight records linked to the Air Clearing File. 

 The system must link flight records using information together with the internal Air Clearing File ID. clearing file. 

 ## 12 9 – Activity Log 

 If flight information is added, updated, or deleted updated after the clearing file has already been created, the system must log the action. log: 

 Suggested logs: 

 \<username\> added flight \<FLIGHT_NO\> for Air Clearing File \<CLEARING_REF\> 

 \<username\> updated flight \<FLIGHT_NO\> information for Air Clearing File \<CLEARING_REF\> 

 \<username\> deleted flight \<FLIGHT_NO\> from Air Clearing File \<CLEARING_REF\> # Validation Rules 

 If a Completed file returns to Draft due to update: | Field | Rule | 
 |-------|------| 
 | Airline | Mandatory | 
 | Departure Airport | Mandatory | 
 | Arrival Airport | Mandatory | 
 | ETD / ETA | ETA should not be earlier than ETD | 
 | ATD / ATA | ATA should not be earlier than ATD | 
 | Airline | Must exist in airline master | 
 | Airports | Must exist in airport master | 

 \<username\> updated flight information for Air Clearing File \<CLEARING_REF\>; status changed from COMPLETED to DRAFT 

 # Error Messages 

 | Scenario | Message | 
 |----------|---------| 
 | Missing Airline | Please select Airline. | 
 | Missing Departure Airport | Please select Departure Airport. | 
 | Missing Arrival Airport | Please select Arrival Airport. | 
 | Invalid airline | Please select a valid airline. | 
 | Invalid airport | Please select a valid airport. | 
 | ETA before ETD | Arrival date/time cannot be earlier than departure date/time. | 
 | ATA before ATD | Actual arrival date/time cannot be earlier than actual departure date/time. | 
 | Connecting flight invalid | The departure date/time of a connecting flight cannot be earlier than the arrival date/time of the previous flight. | 
 | Delete confirmation | Are you sure you want to delete this flight record? | 
 | Closed file update | This clearing file is closed and cannot be updated. | 
 | Cancelled file update | This clearing file is cancelled and cannot be updated. | 

 # Acceptance Criteria 

 ## 1 – Display Section 

 Given I open an Air Clearing File,\ 
 When the page loads,\ 
 Then the Flight Information section should be displayed. 

 ## 2 – Display Flight Grid 

 Given the Flight Information section is displayed,\ 
 Then the system should show a flight grid with columns for: 

 * Airline 
 * Flight Number 
 * Departure Airport 
 * Arrival Airport 
 * ETD 
 * ETA 
 * ATD 
 * ATA 
 * Cargo Terminal / Handling Agent 
 * Remarks 
 * Action 

 ## 3 – Add One Flight 

 Given I am editing an Air Clearing File,\ 
 When I click Add Flight and enter valid flight details,\ 
 Then the system should save and display the flight record in the Flight Information grid. 

 ## 4 – Add Multiple Flights 

 Given I am editing an Air Clearing File,\ 
 When I add more than one flight record,\ 
 Then the system should save and display all flight records in the Flight Information grid. 

 ## 5 – Edit Flight 

 Given a flight record exists,\ 
 When I edit the flight details and save,\ 
 Then the system should update the flight record successfully. 

 ## 6 – Delete Flight 

 Given a flight record exists and the file status allows update,\ 
 When I delete the flight record and confirm,\ 
 Then the system should remove or soft-delete the flight record and refresh the grid. 

 ## 7 – Airline Search by Code 

 Given airline master contains Emirates with IATA code `EK`,\    EK,\ 
 When I type `EK` EK in the Airline dropdown,\ 
 Then the system should return Emirates Airlines. 

 ## 8 3 – Airline Search by Name 

 Given airline master contains Emirates Airlines,\ 
 When I type `Emirates`,\ Emirates,\ 
 Then the system should return Emirates Airlines. 

 ## 9 4 – Auto-populate Multiple Flights from HAWB 

 Given I create an Air Clearing File from an existing HAWB,\ 
 And multiple flight legs exist in the source,\ 
 When the HAWB is selected,\ 
 Then all available flight legs details should populate the Flight Information grid. section. 

 ## 10 5 – Auto-populate Multiple Flights from MAWB 

 Given I create an Air Clearing File from an existing MAWB,\ 
 And multiple flight legs exist in the source,\ 
 When the MAWB is selected,\ 
 Then all available flight legs details should populate the Flight Information grid. section. 

 ## 11 6 – Manual Entry 

 Given I create an Air Clearing File from scratch,\ 
 When the page loads,\ 
 Then the Flight Information grid fields should be empty and the user should be able to add one or more flight records manually. editable. 

 ## 12 7 – Validate ETA/ETD 

 Given ETD and ETA are entered,\ 
 When ETA is earlier than ETD and I click Save,\ 
 Then the system should display: 

 Arrival date/time cannot be earlier than departure date/time. 

 ## 13 8 – Save Flight Information 

 Given valid flight information is entered,\ 
 When I click Save,\ 
 Then the system should save the Flight Information section successfully. 

 ## 14 9 – Activity Log on Update 

 Given an Air Clearing File already exists,\ 
 When I update Flight Information and save,\ 
 Then the system should record the change in Activity Log. 

 ## 15 – Completed File Update Returns to Draft 

 Given the Air Clearing File is in Completed status,\ 
 When I add, edit, or delete a flight row and save,\ 
 Then the system should save the change and return the status to Draft. 

 ## 16 – Read-only When Closed 

 Given the Air Clearing File is Closed,\ 
 When I open the Flight Information section,\ 
 Then Add, Edit, and Delete actions should be disabled or hidden. 

 ## 17 – Read-only When Cancelled 

 Given the Air Clearing File is Cancelled,\ 
 When I open the Flight Information section,\ 
 Then Add, Edit, and Delete actions should be disabled or hidden.

Back