Project organization and structure

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-05-08 08:51:51 +02:00
parent 60d53b2d67
commit 8cb570126a
3 changed files with 107 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ Scope: code changes related only to `BR-PT-004 - Market Price Import`.
## PT-BL-001 - Enforce uniqueness at model level
- Status: to be tested
- Status: done
- Implementation commit: `eaae2e5`
- Priority: high
- Source: [rules/market-price-import.md](../rules/market-price-import.md)
@@ -78,3 +78,17 @@ Scope: code changes related only to `BR-PT-004 - Market Price Import`.
- result message separates business validation errors from parsing/technical errors
- invalid workbook and missing required columns remain blocking `UserError`
- row-level errors still let the import continue
## PT-BL-006 - Fix missing default currency on created price index
- Status: open
- Priority: high
- Source bug: [BUG-PT-001](../bugs.md#bug-pt-001---missing-default-currency-in-price-index-automatic-creation)
- Source rule: [rules/market-price-import.md](../rules/market-price-import.md)
- Requirement: when the market price import automatically creates a missing `price.price`, the created price index must have default currency `USD`.
- Current behavior: the created price index can miss the default currency even though the import specification expects `USD`.
- Expected code impact:
- `modules/purchase_trade/pricing.py`
- Expected tests:
- automatic price index creation assigns `price_currency` to the `USD` currency record
- if the `USD` currency record cannot be found, behavior remains aligned with the rule for optional default references

View File

@@ -0,0 +1,63 @@
# Bugs - Purchase Trade
This file is the bug register for `purchase_trade`.
## Workflow
1. Register every new bug in this file with a stable bug ID.
2. Create a matching backlog entry for every new bug.
3. Link the bug entry to the backlog entry.
4. When fixed, record the implementation commit in the backlog entry.
5. Keep the bug entry as history and update its status.
## Status Values
- `reported`
- `confirmed`
- `backlog-created`
- `in-progress`
- `to-be-tested`
- `done`
- `rejected`
## Bug Template
```md
### BUG-PT-001 - Short title
- Status: `reported`
- Area:
- Reported date: `YYYY-MM-DD`
- Reported by:
- Related rule:
- Backlog entry:
- Severity:
- Environment:
- Description:
- Steps to reproduce:
- Expected behavior:
- Actual behavior:
- Evidence:
- Notes:
```
## Bugs
### BUG-PT-001 - Missing default currency in Price Index automatic creation
- Status: `backlog-created`
- Area: Market Price Import
- Reported date: `2026-05-08`
- Reported by: user
- Related rule: [BR-PT-004 - Market Price Import](rules/market-price-import.md)
- Backlog entry: [PT-BL-006](backlog/market-price-import-backlog.md#pt-bl-006---fix-missing-default-currency-on-created-price-index)
- Severity:
- Environment:
- Description: during market price import, if a price index should be created, then the default currency defined to USD is missing.
- Steps to reproduce:
- import market prices with `Create price index if missing` enabled
- include a `price_index` that does not already exist
- Expected behavior: the automatically created `price.price` has default currency `USD`.
- Actual behavior: the automatically created `price.price` has no default currency.
- Evidence:
- Notes:

View File

@@ -62,6 +62,35 @@ Example:
- expected code impact
- expected tests
Backlog status values:
- `open`: identified, not started yet
- `in-progress`: currently being worked on
- `blocked`: cannot progress until a dependency or question is resolved
- `implemented`: code or documentation change made, not yet validated
- `to-be-tested`: implemented and waiting for targeted validation in the right environment
- `tested`: targeted validation passed
- `done`: tested, committed, and no further action expected
- `rejected`: intentionally not implemented
Default workflow:
```text
open -> in-progress -> to-be-tested -> tested -> done
```
Use `implemented` only when the change is made but no validation attempt has happened yet. Use `to-be-tested` when validation must happen in another environment or could not be completed locally.
## Bug Management
- Register every new bug in `docs/bugs.md`.
- Use stable bug IDs such as `BUG-PT-001`.
- Every new bug must have a matching backlog entry.
- Link the bug entry to its backlog entry.
- If the bug belongs to an existing feature backlog, add it there.
- If the bug does not clearly belong to an existing feature backlog, create a dedicated backlog file under `docs/backlog/`.
- When the bug is fixed, record the implementation commit in the backlog entry and update the bug status.
## Review Workflow
For future development work: