Skip to content

v5.4.0

Latest

Choose a tag to compare

@Kani999 Kani999 released this 10 Dec 09:45

This major release introduces a comprehensive Contract Information Management System, replacing the previous SegmentFinancialInfo model. It adds support for contract versioning (amendments/renewals), many-to-many relationships between contracts and segments, and enhanced financial tracking.

🚀 New Features

Contract Information Management

  • Complete Replacement: Replaced SegmentFinancialInfo with a robust ContractInfo model.
  • Versioning System: Implemented a linear version chain (linked list) to track contract history.
    • Support for New, Amendment, and Renewal contract types.
    • Automatic version numbering (v1, v2, v3...).
    • Ability to clone contracts to create amendments while preserving immutable fields like currency.
    • Visual timeline in the UI showing the evolution of a contract.
  • Many-to-Many Relationships: A single contract can now cover multiple network segments, and a segment can have multiple contracts.

Enhanced Financial Tracking

  • Flexible Recurring Charges: Support for configurable billing periods (Monthly, Quarterly, Semi-Annually, Annually).
  • Commitment Tracking: Automatic calculation of commitment end dates based on the start date and number of billing periods.
  • Multi-Currency Support: Currency is now immutable per contract chain to ensure financial consistency.
  • Calculated Fields: Automatic calculation of Total Recurring Cost and Total Contract Value.

UI & Visualization

  • New Views: Dedicated list and detail views for Contracts.
  • Visual Indicators: Color-coded badges for contract status and date proximity (Green/Orange/Red).
  • Interactive Tooltips: Hover details showing exact dates and days remaining for commitments.
  • Segment Integration: Segment detail views now display all associated active contracts in a dedicated panel.

API & GraphQL

  • New REST Endpoint: /api/plugins/cesnet-service-path-plugin/contract-info/
  • GraphQL Support: Full support for querying contract versions, relationships, and computed financial fields.
  • Advanced Filtering: Filter contracts by active status, version, currency, and date ranges.

💥 Breaking Changes

  • Removed Model: The SegmentFinancialInfo model and table have been removed.
  • API Removal: The /api/plugins/cesnet-service-path-plugin/segment-financial-info/ endpoint has been removed.
  • Permissions: New permissions (view_contractinfo, add_contractinfo, etc.) replace the old financial info permissions.

🔄 Migration & Upgrade

  • Database Migration: Migration 0033 automatically converts existing SegmentFinancialInfo data to ContractInfo.
    • Preserves all charges, notes, and dates.
    • Converts "Monthly Charge" to "Recurring Charge" (Monthly).
    • Converts "Commitment Months" to "Number of Recurring Charges".
  • Upgrade Steps:
    1. Backup your database.
    2. Install the update: pip install --upgrade cesnet_service_path_plugin
    3. Run migrations: python manage.py migrate cesnet_service_path_plugin
    4. Update API clients to use the new /contract-info/ endpoint.
    5. Review and assign new user permissions.

🐛 Bug Fixes

  • Improved decimal handling in financial calculations.
  • Enhanced date validation logic for contract periods.
  • Fixed M2M relationship serialization in API responses.

Full Changelog: v5.3.0...v5.4.0