Module: br-orderrequest (iTop-br-orderrequest) Version: 0.0.1 Date: 2025-11-13 Target iTop: 3.2.x (tested on 3.2.2) Author: Björn Rudner
Manual validation of:
OrderRequest lifecycle (including secondary budget approval)estimated_total_costOrderRequestTypedraft, rejected, closed)policy_mode: warnapproval_restrict_to_assigned_approver: trueapproval_forbid_self_approval: truebudget_auto_threshold: 0 (disabled)Only a single temporary switch is used later for “enforce-mode & threshold” tests, then reverted.
Create (or ensure availability of) the following Persons in Organization: ACME:
alice.requester@acme.exampletom.tech@acme.examplebob.budget@acme.examplesam.agent@acme.exampleGive them typical profiles so they can log in / act (e.g., portal user for requester, console users for approvers).
1) Type A (No Budget)
code: STD-NO-BUDGETname: Standard (No Budget)status: activerequires_budget_owner_approval: nodefault_approver_id: Tom Tech
2) Type B (With Budget)code: STD-BUDGETname: Standard (Budget)status: activerequires_budget_owner_approval: yesbudget_approver_id: Bob Budgetdefault_approver_id: Tom Tech (optional but convenient)Keep at least one
FunctionalCIin ACME (e.g.,Laptop-INV-001) to use in link tests.
Create > OrderRequest
ACMEStandard (No Budget) (Type A)Laptop procurementTwo developer laptopsLaptop Pro 14"2EA12002400.00
Expected: OrderRequest.estimated_total_cost updates to 2400.00.Docking Station2EA150300.00
Expected: estimated_total_cost = 2400.00 + 300.00 = 2700.00.technical_approver_id = Tom Tech.Empty request.draft.
Expected: Blocking message “Please add at least one line item before submitting.”Standard (Budget) (Type B).
Expected:
budget_approver_id defaults to Bob Budget.Standard (No Budget) (Type A).
Expected: Budget-related fields (budget_approver_id, budget dates/comments) are cleared by compute logic on type change.draft → submitted → in_review → waiting_approval.OK for procurement
Expected:approved.approved_by_id = Tom Tech, approval_date set.procurement_reference still empty.PO-2025-0001.
Expected:procurement, procurement_reference = PO-2025-0001.Firewall license renewal with Type B.Firewall License12MON100
Expected: total = 1200.00, estimated_total_cost = 1200.00.waiting_approval.waiting_budget_approval, budget_approval_request_date set.Within budget.
Expected: Status approved, budget approver & date set.Baseline is
policy_mode = warn.
waiting_approval, act as someone NOT Tom Tech (e.g., Requester).waiting_approval, act as Requester (caller = current user).Laptop Pro 14").Laptop-INV-001 (or any CI).
Expected: Link row appears.draft, approved, procurement, closed), and add/edit/remove CI links.
Expected: Always allowed; no lifecycle restrictions.Monitor 27" and submit to each state to test:
This reflects code that permits delete in
draft,rejected,closed; denies otherwise.
A: qty 1, unit 0.1 → total 0.10B: qty 3, unit 33.333 → total 99.999 (rounded to 100.00 by compute)C: qty 2, unit 10 → total 20.00
Expected: estimated_total_cost = 0.10 + 100.00 + 20.00 = 120.10 (rounded to 2 decimals).inactive.OrderRequest in ACME.
Expected: Type A is not offered; Type B (active) shows.active.Pick a ticket and inspect attribute behavior:
estimated_total_cost is RO; system fields (ref, start_date, last_update) RO; approval fields hidden.approved_by_id hidden until action; dates RO/hidden per state.procurement_reference RO after procurement; system dates RO.Expected: Flags match the lifecycle XML.
Temporarily set:
policy_mode = enforcebudget_auto_threshold = 1000Keep:approval_restrict_to_assigned_approver = trueapproval_forbid_self_approval = true
estimated_total_cost >= 1000 (e.g., 2×1200).waiting_approval.waiting_budget_approval.Revert config to baseline after these tests:
policy_mode = warn,budget_auto_threshold = 0.
OrderRequestType statuses back to active.lnkOrderRequestLineItemToFunctionalCI (by design, to keep it simple).Use this table (copy per run):
| Test ID | Name | Result (Pass/Fail) | Notes / Evidence |
|---|---|---|---|
| A | Create, line items, totals | ||
| B | Submit guard (no items) | ||
| C | Type change & defaults | ||
| D | Approval without budget | ||
| E | Budget path required | ||
| F1 | Warn: Only assigned approver | ||
| F2 | Warn: Self-approval | ||
| G | FunctionalCI links | ||
| H | Line item deletion rules | ||
| I | Roll-up & rounding | ||
| J | Type filtering by status | ||
| K | Read-only flags by state | ||
| L1 | Enforce: threshold | ||
| L2 | Enforce: only assigned | ||
| L3 | Enforce: self-approval | ||
| L4 | Enforce: budget approver |
Save this file as: