Project

General

Profile

Actions

User Story #679

open

EPIC #670: Package Catalogue Management - 2 days front end and 2 days backend

Feature #677: edit Package

Backend – Edit Package

Added by Islam Mansoori about 1 month ago.

Status:
To Do
Priority:
low
Assignee:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

As a Super Admin, I want the system to update existing package information so that the package catalogue remains accurate, consistent, and ready for publication.


Business Background

Package information evolves over time due to supplier updates, itinerary refinements, pricing strategy changes, and destination enhancements. The backend must ensure that package updates maintain data integrity, preserve audit history, and support the draft-to-publish lifecycle without affecting customer-visible content until publishing is complete.


Objective

The backend shall:

  • Update package information.
  • Validate modified data.
  • Preserve package identity.
  • Maintain audit history.
  • Prevent invalid or duplicate updates.
  • Keep package status unchanged unless explicitly updated through the publishing workflow.

Functional Behaviour

The system shall:

  • Retrieve the existing package.
  • Verify user permissions.
  • Validate updated information.
  • Verify referenced Country and City.
  • Check for duplicate package information.
  • Save modified data.
  • Update audit metadata.
  • Return the latest package information.

Business Logic

Package Update

  • Only users with Package Management permission can modify packages.
  • Package ID and Package Code cannot be changed.
  • Created By and Created Date remain unchanged.
  • Last Updated By and Last Updated Date shall be refreshed after every successful update.
  • Updating a package shall not automatically publish it.

Status Management

  • Draft packages remain Draft after editing.
  • Published packages retain their current status unless the Publish workflow defines otherwise.
  • Archived packages may only be edited if permitted by business rules.

Duplicate Validation

Before saving:

  • Validate Package Name uniqueness according to business rules.
  • Prevent duplicate packages within the same destination.
  • Ignore the current package during duplicate checks.

Master Data Validation

Validate:

  • Country exists and is active.
  • City exists, is active, and belongs to the selected Country.

Database Entity Changes

Updated Entity

Package

The following fields may be updated:

  • Package Name
  • Country
  • City
  • Duration
  • Package Type
  • Overview
  • Highlights
  • Suitable For
  • Best Travel Season
  • Display Order
  • Featured Flag
  • Visibility

The following fields shall remain unchanged:

  • Package ID
  • Package Code
  • Created By
  • Created Date

Validation Rules

Validation Rule
Package exists Mandatory
Package Name Required
Country Active
City Active and mapped to Country
Duplicate Package Not Allowed
Package Code Cannot be modified
Created Information Cannot be modified

Audit Requirements

Every successful update shall record:

  • Updated By
  • Updated Date
  • Activity Type = Package Updated
  • Modified fields (where audit tracking is enabled)

Permission Rules

Role Permission
Super Admin Update Package
Admin (if configured) Based on assigned permissions
Supplier Not Allowed
Partner Not Allowed
Customer Not Allowed

Acceptance Criteria

AC-1

Given a valid package exists

When an update request is received

Then the package information shall be updated successfully.


AC-2

Given mandatory information is missing

When validation occurs

Then the update shall not be processed.


AC-3

Given Country or City validation fails

When the update is processed

Then the package shall not be updated.


AC-4

Given duplicate package information is detected

When validation completes

Then the update shall be rejected until resolved.


AC-5

Given the package update succeeds

When the transaction completes

Then audit information shall be updated automatically.


AC-6

Given a Draft package

When it is edited

Then it shall remain in Draft status.


AC-7

Given Package Code exists

When an update occurs

Then Package Code shall remain unchanged.


In Scope

  • Package update
  • Validation
  • Duplicate verification
  • Master data verification
  • Audit update
  • Permission validation

Out of Scope

  • Package publishing
  • Package deletion
  • Itinerary updates
  • Image updates
  • Halal facilities
  • Package pricing
  • Package groups
  • SEO management

Dependencies

  • Package Master
  • Country Master
  • City Master
  • Authentication
  • Authorization
  • Audit Logging

Edge Cases

  • Simultaneous edits by multiple administrators.
  • Package archived during editing.
  • Country or City deactivated before save.
  • Session expiration during update.
  • Concurrent updates causing stale data.
  • Unexpected interruption during transaction.

Definition of Done

  • Package updates processed successfully.
  • Business rules validated.
  • Audit history maintained.
  • Package identity preserved.
  • Status lifecycle respected.
  • Acceptance criteria satisfied.
  • QA verification completed.
  • Product Owner approval obtained.

No data to display

Actions

Also available in: Atom PDF