Bug: entities show raw SIDs instead of names in list and detail views; relationship fields wiped on edit #11

Closed
opened 2026-04-30 16:37:00 +00:00 by casper-stevens · 3 comments
Member

Summary

Two systemic bugs across many entity types:

  1. Raw SIDs displayed instead of resolved entity names — affects both list views and some detail views
  2. Relationship fields silently wiped on create/update — affects Contact, Deal, Task, Project, Milestone

Bug 1 — Raw SIDs shown instead of entity names

List views (all affected)

List handlers pass raw entity structs to templates without loading related entities. Templates then render the raw *_sid string.

Handler Unresolved SID fields Line
instruments_list company_sid 483
contracts_list person_sid, company_sid, instrument_sid, fund_sid 860
transactions_list contract_sid 1292
contacts_list person_sid, company_sid, user_sid, contract_sid, opportunity_sid, deal_sid 1690
opportunities_list company_sid, person_sid 1773
deals_list company_sid, person_sid, opportunity_sid, instrument_sid, contract_sid 1842
projects_list company_sid, owner_sid 4536
tasks_list project_sid, milestone_sid, assignee_sid, story_sid 4639
milestones_list project_sid, owner_sid 4725

Detail views (two affected)

Most detail handlers correctly load and resolve related entities. Two exceptions:

Handler Unresolved SID fields Line
persons_detail company_sid — person has a company field but handler never loads it 322
comments_detail All 11 relationship SID fields (company_sid, person_sid, instrument_sid, contract_sid, opportunity_sid, deal_sid, project_sid, task_sid, milestone_sid, transaction_sid, contact_sid) — handler only loads the comment itself 1667

All in crates/hero_biz_ui/src/web/handlers/mod.rs.

Fix pattern: load related entities in each handler (the same lookups the working detail handlers already do), then pass them to the template for name resolution.


Bug 2 — Relationship fields silently wiped on create/update

When building the updated struct, several *_sid and other fields are hardcoded to None / Vec::new() instead of being read from the form or preserved from the existing record. Any value set via the Links button is lost the moment the edit form is saved.

contact_create (~line 6373) and contact_update (~line 6524)

contract_sid: None,      // always wiped
opportunity_sid: None,   // always wiped
deal_sid: None,          // always wiped

ContactForm (line 6280) has no fields for these three.

deal_create (~line 2377) and deal_update (~line 2562)

instrument_sid: None,    // always wiped
contract_sid: None,      // always wiped

deal_update preserves links from the existing record but still wipes these two.

task_create (~line 7316) and task_update (~line 7481)

story_sid: None,         // always wiped

TaskForm has no story_sid field.

project_create (~line 6701) and project_update (~line 6846)

end_date: None,
links: Vec::new(),
swimLanes: Vec::new(),

None preserved from existing record.

milestone_create (~line 7002) and milestone_update (~line 7156)

completed_date: None,
completed_at: None,
links: Vec::new(),

Fix pattern: in each *_update handler, load the existing record first, then copy the hardcoded-None fields from it before saving — the same read-modify-write pattern already used by update_contact_links, update_deal_links, etc. For *_create handlers, decide whether each field is intentionally absent from the creation form (acceptable) or should be settable.

## Summary Two systemic bugs across many entity types: 1. **Raw SIDs displayed instead of resolved entity names** — affects both list views and some detail views 2. **Relationship fields silently wiped on create/update** — affects Contact, Deal, Task, Project, Milestone --- ## Bug 1 — Raw SIDs shown instead of entity names ### List views (all affected) List handlers pass raw entity structs to templates without loading related entities. Templates then render the raw `*_sid` string. | Handler | Unresolved SID fields | Line | |---|---|---| | `instruments_list` | `company_sid` | 483 | | `contracts_list` | `person_sid`, `company_sid`, `instrument_sid`, `fund_sid` | 860 | | `transactions_list` | `contract_sid` | 1292 | | `contacts_list` | `person_sid`, `company_sid`, `user_sid`, `contract_sid`, `opportunity_sid`, `deal_sid` | 1690 | | `opportunities_list` | `company_sid`, `person_sid` | 1773 | | `deals_list` | `company_sid`, `person_sid`, `opportunity_sid`, `instrument_sid`, `contract_sid` | 1842 | | `projects_list` | `company_sid`, `owner_sid` | 4536 | | `tasks_list` | `project_sid`, `milestone_sid`, `assignee_sid`, `story_sid` | 4639 | | `milestones_list` | `project_sid`, `owner_sid` | 4725 | ### Detail views (two affected) Most detail handlers correctly load and resolve related entities. Two exceptions: | Handler | Unresolved SID fields | Line | |---|---|---| | `persons_detail` | `company_sid` — person has a company field but handler never loads it | 322 | | `comments_detail` | All 11 relationship SID fields (`company_sid`, `person_sid`, `instrument_sid`, `contract_sid`, `opportunity_sid`, `deal_sid`, `project_sid`, `task_sid`, `milestone_sid`, `transaction_sid`, `contact_sid`) — handler only loads the comment itself | 1667 | All in `crates/hero_biz_ui/src/web/handlers/mod.rs`. **Fix pattern:** load related entities in each handler (the same lookups the working detail handlers already do), then pass them to the template for name resolution. --- ## Bug 2 — Relationship fields silently wiped on create/update When building the updated struct, several `*_sid` and other fields are hardcoded to `None` / `Vec::new()` instead of being read from the form or preserved from the existing record. Any value set via the **Links** button is lost the moment the edit form is saved. ### `contact_create` (~line 6373) and `contact_update` (~line 6524) ```rust contract_sid: None, // always wiped opportunity_sid: None, // always wiped deal_sid: None, // always wiped ``` `ContactForm` (line 6280) has no fields for these three. ### `deal_create` (~line 2377) and `deal_update` (~line 2562) ```rust instrument_sid: None, // always wiped contract_sid: None, // always wiped ``` `deal_update` preserves `links` from the existing record but still wipes these two. ### `task_create` (~line 7316) and `task_update` (~line 7481) ```rust story_sid: None, // always wiped ``` `TaskForm` has no `story_sid` field. ### `project_create` (~line 6701) and `project_update` (~line 6846) ```rust end_date: None, links: Vec::new(), swimLanes: Vec::new(), ``` None preserved from existing record. ### `milestone_create` (~line 7002) and `milestone_update` (~line 7156) ```rust completed_date: None, completed_at: None, links: Vec::new(), ``` **Fix pattern:** in each `*_update` handler, load the existing record first, then copy the hardcoded-None fields from it before saving — the same read-modify-write pattern already used by `update_contact_links`, `update_deal_links`, etc. For `*_create` handlers, decide whether each field is intentionally absent from the creation form (acceptable) or should be settable.
casper-stevens changed title from Bug: entities show ID instead of name in list views; contact links lost on edit to Bug: entities show raw SIDs instead of names in list and detail views; relationship fields wiped on edit 2026-04-30 16:40:53 +00:00
Author
Member

Implementation Spec for Issue #11

Objective

Fix two systemic bugs in crates/hero_biz_ui/src/web/handlers/mod.rs and crates/hero_biz_ui/src/web/templates/mod.rs:

  1. Bug 1: Nine list handlers and two detail handlers pass raw entity structs to templates without loading related entities, causing raw SID strings to appear in the UI.
  2. Bug 2: Five entity *_update handlers hardcode relationship SID fields to None / Vec::new(), silently wiping any links set via the Links button.

Requirements

  • Every list view that displays a SID column must display the resolved name of the related entity (linked to its detail page).
  • Every detail view must display all relationship fields as resolved names/links.
  • persons_detail must load the linked Company and display it as a resolved link.
  • comments_detail must load all 11 possible related entities and display whichever are set as resolved links.
  • Every *_update handler must perform a read-modify-write: load the existing record first, then apply form values on top, copying any fields not in the form from the existing record.
  • No existing behavior of working handlers must be changed.
  • The code must compile cleanly with no new warnings.

Files to Modify

File Role
crates/hero_biz_ui/src/web/handlers/mod.rs All handler fixes (both bugs)
crates/hero_biz_ui/src/web/templates/mod.rs Template struct additions and render method changes

Implementation Plan

Step 1 -- Fix instruments_list: load companies, resolve company_sid

Files: handlers/mod.rs (~line 483), templates/mod.rs (~line 953)

  • In instruments_list, load all companies for the space after loading instruments
  • Add companies: Vec<Company> field to InstrumentsListTemplate
  • In the render loop, replace raw company_sid with a lookup producing a resolved name/link

Dependencies: none

Step 2 -- Fix contracts_list: load persons/companies, resolve SIDs

Files: handlers/mod.rs (~line 860), templates/mod.rs (~line 1587)

  • Load persons and companies for the space
  • Add those fields to ContractsListTemplate
  • Add Person and Company columns to the rendered table with resolved lookups

Dependencies: none

Step 3 -- Fix transactions_list: load contracts, resolve contract_sid

Files: handlers/mod.rs (~line 1292), templates/mod.rs (~line 2186)

  • Load contracts for the space
  • Add contracts: Vec<Contract> to TransactionsListTemplate
  • Replace raw contract_sid display with resolved contract name

Dependencies: none

Step 4 -- Fix contacts_list: load persons/companies, add resolved columns

Files: handlers/mod.rs (~line 1690), templates/mod.rs (~line 2749)

  • Load persons and companies for the space
  • Add those fields to ContactsListTemplate
  • Add Person and Company columns with resolved lookups

Dependencies: none

Step 5 -- Fix opportunities_list: load companies/persons, add resolved columns

Files: handlers/mod.rs (~line 1773), templates/mod.rs (~line 2984)

  • Load companies and persons for the space
  • Add those fields to OpportunitiesListTemplate
  • Add resolved Company and Person columns

Dependencies: none

Step 6 -- Fix deals_list: load companies/persons/opportunities, add resolved columns

Files: handlers/mod.rs (~line 1842), templates/mod.rs (~line 3184)

  • Load companies, persons, and opportunities for the space
  • Add those fields to DealsListTemplate
  • Add resolved Company and Person columns

Dependencies: none

Step 7 -- Fix projects_list: load companies/persons, add resolved columns

Files: handlers/mod.rs (~line 4536), templates/mod.rs (~line 3726)

  • Load companies and persons for the space
  • Add those fields to ProjectsListTemplate
  • Add resolved Company and Owner columns

Dependencies: none

Step 8 -- Fix tasks_list: load milestones/persons, resolve milestone_sid and assignee_sid

Files: handlers/mod.rs (~line 4639), templates/mod.rs (~line 4021)

  • Load milestones and persons for the space (projects already loaded)
  • Add milestones and persons to TasksListTemplate
  • Add/resolve Milestone and Assignee columns

Dependencies: none

Step 9 -- Fix milestones_list: load projects/persons, add resolved columns

Files: handlers/mod.rs (~line 4725), templates/mod.rs (~line 4422)

  • Load projects and persons for the space
  • Add those fields to MilestonesListTemplate
  • Add resolved Project and Owner columns

Dependencies: none

Files: handlers/mod.rs (~line 322), templates/mod.rs (~line 401)

  • Load Company from person.company_sid (if set)
  • Add company: Option<Company> to PersonDetailTemplate
  • Add a Company row to the <dl> in the rendered detail view

Dependencies: none

Files: handlers/mod.rs (~line 1667), templates/mod.rs (~line 2692)

  • Conditionally load each of the 11 related entities from the comment's SID fields
  • Add all 11 as Option<EntityType> fields on CommentDetailTemplate
  • Add corresponding <dt>/<dd> rows to the rendered detail view

Dependencies: none

Step 12 -- Fix contact_update: preserve contract_sid, opportunity_sid, deal_sid

Files: handlers/mod.rs (~line 6524)

  • Load the existing Contact record before building the updated struct
  • Replace contract_sid: None, opportunity_sid: None, deal_sid: None with values from existing record

Dependencies: none

Step 13 -- Fix deal_update: preserve instrument_sid and contract_sid

Files: handlers/mod.rs (~line 2562)

  • The handler already loads existing to preserve links
  • Extend to also preserve instrument_sid and contract_sid from the existing record

Dependencies: none

Step 14 -- Fix task_update: preserve story_sid, depends_on, and links

Files: handlers/mod.rs (~line 7481)

  • Load the existing Task record
  • Replace story_sid: None, depends_on: Vec::new(), links: Vec::new() with values from existing record

Dependencies: none

Files: handlers/mod.rs (~line 6846)

  • Load the existing Project record
  • Replace end_date: None, links: Vec::new(), swimlanes: Vec::new() with values from existing record

Dependencies: none

Files: handlers/mod.rs (~line 7156)

  • Load the existing Milestone record (the validation path may already load it -- hoist to before validation)
  • Replace completed_date: None, completed_at: None, links: Vec::new() with values from existing record

Dependencies: none


Acceptance Criteria

  • instruments_list shows company name (linked) instead of raw SID
  • contracts_list shows resolved person and company columns
  • transactions_list shows resolved contract name instead of raw SID
  • contacts_list shows resolved person and company columns
  • opportunities_list shows resolved company and person columns
  • deals_list shows resolved company and person columns
  • projects_list shows resolved company and owner columns
  • tasks_list shows resolved milestone and assignee columns
  • milestones_list shows resolved project and owner columns
  • persons_detail shows a Company field with a resolved link
  • comments_detail shows resolved links for all relationship fields that are set
  • Saving a Contact does not wipe contract_sid, opportunity_sid, or deal_sid
  • Saving a Deal does not wipe instrument_sid or contract_sid
  • Saving a Task does not wipe story_sid, depends_on, or links
  • Saving a Project does not wipe end_date, links, or swimlanes
  • Saving a Milestone does not wipe completed_date, completed_at, or links
  • cargo build completes with no errors and no new warnings

Notes

  • Lookup pattern for list templates: Use the existing idiom (t.x_sid.as_ref().and_then(|sid| self.xs.iter().find(|x| x.id() == sid.as_str())).map(|x| x.name.clone()).unwrap_or_else(|| "-".to_string())).
  • Link pattern for detail templates: Use if let Some(x) = &self.x { format link } else { raw_sid }.
  • Performance: Loading all entities per space per list view is the established pattern. Space-scoped stores are expected to hold small collections.
  • Bug 2 create handlers: The *_create handlers for Contact, Deal, and Task are intentionally left with None for link SID fields not in their forms -- document each with a comment.
  • Steps 1-11 (Bug 1) and Steps 12-16 (Bug 2) are fully independent of each other and can be implemented in parallel.
## Implementation Spec for Issue #11 ### Objective Fix two systemic bugs in `crates/hero_biz_ui/src/web/handlers/mod.rs` and `crates/hero_biz_ui/src/web/templates/mod.rs`: 1. **Bug 1:** Nine list handlers and two detail handlers pass raw entity structs to templates without loading related entities, causing raw SID strings to appear in the UI. 2. **Bug 2:** Five entity `*_update` handlers hardcode relationship SID fields to `None` / `Vec::new()`, silently wiping any links set via the Links button. --- ### Requirements - Every list view that displays a SID column must display the resolved name of the related entity (linked to its detail page). - Every detail view must display all relationship fields as resolved names/links. - `persons_detail` must load the linked Company and display it as a resolved link. - `comments_detail` must load all 11 possible related entities and display whichever are set as resolved links. - Every `*_update` handler must perform a read-modify-write: load the existing record first, then apply form values on top, copying any fields not in the form from the existing record. - No existing behavior of working handlers must be changed. - The code must compile cleanly with no new warnings. --- ### Files to Modify | File | Role | |---|---| | `crates/hero_biz_ui/src/web/handlers/mod.rs` | All handler fixes (both bugs) | | `crates/hero_biz_ui/src/web/templates/mod.rs` | Template struct additions and render method changes | --- ### Implementation Plan #### Step 1 -- Fix `instruments_list`: load companies, resolve `company_sid` **Files:** `handlers/mod.rs` (~line 483), `templates/mod.rs` (~line 953) - In `instruments_list`, load all companies for the space after loading instruments - Add `companies: Vec<Company>` field to `InstrumentsListTemplate` - In the render loop, replace raw `company_sid` with a lookup producing a resolved name/link Dependencies: none #### Step 2 -- Fix `contracts_list`: load persons/companies, resolve SIDs **Files:** `handlers/mod.rs` (~line 860), `templates/mod.rs` (~line 1587) - Load `persons` and `companies` for the space - Add those fields to `ContractsListTemplate` - Add Person and Company columns to the rendered table with resolved lookups Dependencies: none #### Step 3 -- Fix `transactions_list`: load contracts, resolve `contract_sid` **Files:** `handlers/mod.rs` (~line 1292), `templates/mod.rs` (~line 2186) - Load `contracts` for the space - Add `contracts: Vec<Contract>` to `TransactionsListTemplate` - Replace raw `contract_sid` display with resolved contract name Dependencies: none #### Step 4 -- Fix `contacts_list`: load persons/companies, add resolved columns **Files:** `handlers/mod.rs` (~line 1690), `templates/mod.rs` (~line 2749) - Load `persons` and `companies` for the space - Add those fields to `ContactsListTemplate` - Add Person and Company columns with resolved lookups Dependencies: none #### Step 5 -- Fix `opportunities_list`: load companies/persons, add resolved columns **Files:** `handlers/mod.rs` (~line 1773), `templates/mod.rs` (~line 2984) - Load `companies` and `persons` for the space - Add those fields to `OpportunitiesListTemplate` - Add resolved Company and Person columns Dependencies: none #### Step 6 -- Fix `deals_list`: load companies/persons/opportunities, add resolved columns **Files:** `handlers/mod.rs` (~line 1842), `templates/mod.rs` (~line 3184) - Load `companies`, `persons`, and `opportunities` for the space - Add those fields to `DealsListTemplate` - Add resolved Company and Person columns Dependencies: none #### Step 7 -- Fix `projects_list`: load companies/persons, add resolved columns **Files:** `handlers/mod.rs` (~line 4536), `templates/mod.rs` (~line 3726) - Load `companies` and `persons` for the space - Add those fields to `ProjectsListTemplate` - Add resolved Company and Owner columns Dependencies: none #### Step 8 -- Fix `tasks_list`: load milestones/persons, resolve `milestone_sid` and `assignee_sid` **Files:** `handlers/mod.rs` (~line 4639), `templates/mod.rs` (~line 4021) - Load `milestones` and `persons` for the space (projects already loaded) - Add `milestones` and `persons` to `TasksListTemplate` - Add/resolve Milestone and Assignee columns Dependencies: none #### Step 9 -- Fix `milestones_list`: load projects/persons, add resolved columns **Files:** `handlers/mod.rs` (~line 4725), `templates/mod.rs` (~line 4422) - Load `projects` and `persons` for the space - Add those fields to `MilestonesListTemplate` - Add resolved Project and Owner columns Dependencies: none #### Step 10 -- Fix `persons_detail`: load company, display as resolved link **Files:** `handlers/mod.rs` (~line 322), `templates/mod.rs` (~line 401) - Load `Company` from `person.company_sid` (if set) - Add `company: Option<Company>` to `PersonDetailTemplate` - Add a Company row to the `<dl>` in the rendered detail view Dependencies: none #### Step 11 -- Fix `comments_detail`: load all 11 related entities and display them **Files:** `handlers/mod.rs` (~line 1667), `templates/mod.rs` (~line 2692) - Conditionally load each of the 11 related entities from the comment's SID fields - Add all 11 as `Option<EntityType>` fields on `CommentDetailTemplate` - Add corresponding `<dt>/<dd>` rows to the rendered detail view Dependencies: none #### Step 12 -- Fix `contact_update`: preserve `contract_sid`, `opportunity_sid`, `deal_sid` **Files:** `handlers/mod.rs` (~line 6524) - Load the existing Contact record before building the updated struct - Replace `contract_sid: None`, `opportunity_sid: None`, `deal_sid: None` with values from existing record Dependencies: none #### Step 13 -- Fix `deal_update`: preserve `instrument_sid` and `contract_sid` **Files:** `handlers/mod.rs` (~line 2562) - The handler already loads `existing` to preserve `links` - Extend to also preserve `instrument_sid` and `contract_sid` from the existing record Dependencies: none #### Step 14 -- Fix `task_update`: preserve `story_sid`, `depends_on`, and `links` **Files:** `handlers/mod.rs` (~line 7481) - Load the existing Task record - Replace `story_sid: None`, `depends_on: Vec::new()`, `links: Vec::new()` with values from existing record Dependencies: none #### Step 15 -- Fix `project_update`: preserve `end_date`, `links`, and `swimlanes` **Files:** `handlers/mod.rs` (~line 6846) - Load the existing Project record - Replace `end_date: None`, `links: Vec::new()`, `swimlanes: Vec::new()` with values from existing record Dependencies: none #### Step 16 -- Fix `milestone_update`: preserve `completed_date`, `completed_at`, and `links` **Files:** `handlers/mod.rs` (~line 7156) - Load the existing Milestone record (the validation path may already load it -- hoist to before validation) - Replace `completed_date: None`, `completed_at: None`, `links: Vec::new()` with values from existing record Dependencies: none --- ### Acceptance Criteria - [ ] `instruments_list` shows company name (linked) instead of raw SID - [ ] `contracts_list` shows resolved person and company columns - [ ] `transactions_list` shows resolved contract name instead of raw SID - [ ] `contacts_list` shows resolved person and company columns - [ ] `opportunities_list` shows resolved company and person columns - [ ] `deals_list` shows resolved company and person columns - [ ] `projects_list` shows resolved company and owner columns - [ ] `tasks_list` shows resolved milestone and assignee columns - [ ] `milestones_list` shows resolved project and owner columns - [ ] `persons_detail` shows a Company field with a resolved link - [ ] `comments_detail` shows resolved links for all relationship fields that are set - [ ] Saving a Contact does not wipe `contract_sid`, `opportunity_sid`, or `deal_sid` - [ ] Saving a Deal does not wipe `instrument_sid` or `contract_sid` - [ ] Saving a Task does not wipe `story_sid`, `depends_on`, or `links` - [ ] Saving a Project does not wipe `end_date`, `links`, or `swimlanes` - [ ] Saving a Milestone does not wipe `completed_date`, `completed_at`, or `links` - [ ] `cargo build` completes with no errors and no new warnings --- ### Notes - **Lookup pattern for list templates:** Use the existing idiom (`t.x_sid.as_ref().and_then(|sid| self.xs.iter().find(|x| x.id() == sid.as_str())).map(|x| x.name.clone()).unwrap_or_else(|| "-".to_string())`). - **Link pattern for detail templates:** Use `if let Some(x) = &self.x { format link } else { raw_sid }`. - **Performance:** Loading all entities per space per list view is the established pattern. Space-scoped stores are expected to hold small collections. - **Bug 2 create handlers:** The `*_create` handlers for Contact, Deal, and Task are intentionally left with `None` for link SID fields not in their forms -- document each with a comment. - **Steps 1-11 (Bug 1) and Steps 12-16 (Bug 2)** are fully independent of each other and can be implemented in parallel.
Author
Member

Build & Test Results

Build

PASS

Build completed successfully (release profile, optimized). No errors or warnings.

Tests

1 passed; 0 failed; 0 ignored

  • hero_biz: 0 tests
  • hero_biz_app: 0 tests
  • hero_biz_sdk: 0 tests
  • hero_biz_ui: 1 passed (parser::tests::test_name_fix)
  • Doc-tests: 0 tests

All tests passed.

## Build & Test Results ### Build PASS Build completed successfully (release profile, optimized). No errors or warnings. ### Tests 1 passed; 0 failed; 0 ignored - hero_biz: 0 tests - hero_biz_app: 0 tests - hero_biz_sdk: 0 tests - hero_biz_ui: 1 passed (parser::tests::test_name_fix) - Doc-tests: 0 tests All tests passed.
Author
Member

Implementation Complete

Bug 1 — Raw SIDs replaced with resolved names

List views (9 handlers fixed):

  • instruments_list: loads companies, resolves company_sid to name in the Company column
  • contracts_list: loads persons and companies, adds Person and Company columns with resolved names
  • transactions_list: loads contracts, resolves contract_sid to contract name
  • contacts_list: loads persons and companies, adds Person and Company columns
  • opportunities_list: loads companies and persons, adds Company and Person columns
  • deals_list: loads companies and persons, adds Company and Person columns
  • projects_list: loads companies and persons, resolves company_sid and owner_sid
  • tasks_list: loads milestones and persons, adds Milestone and Assignee columns (project column was already resolved)
  • milestones_list: loads projects and persons, adds Project and Owner columns

Detail views (2 handlers fixed):

  • persons_detail: loads the linked Company (if set) and displays it as a resolved link in the detail <dl>
  • comments_detail: loads all 11 possible related entities (company, person, instrument, contract, opportunity, deal, project, task, milestone, transaction, contact) and renders whichever are set as resolved links in the detail view

Bug 2 — Relationship fields preserved on update

Five *_update handlers now perform a read-modify-write: the existing record is loaded first and any fields not present in the edit form are copied from it rather than defaulted to None / Vec::new().

  • contact_update: preserves contract_sid, opportunity_sid, deal_sid
  • deal_update: preserves instrument_sid, contract_sid (handler already preserved links)
  • task_update: preserves story_sid, depends_on, links
  • project_update: preserves end_date, links, swimlanes
  • milestone_update: preserves completed_date, completed_at, links

Files changed

  • crates/hero_biz_ui/src/web/handlers/mod.rs
  • crates/hero_biz_ui/src/web/templates/mod.rs

Build & Tests

make build passes with no errors or warnings. All existing tests pass (1 test in hero_biz_ui).

## Implementation Complete ### Bug 1 — Raw SIDs replaced with resolved names **List views (9 handlers fixed):** - `instruments_list`: loads companies, resolves `company_sid` to name in the Company column - `contracts_list`: loads persons and companies, adds Person and Company columns with resolved names - `transactions_list`: loads contracts, resolves `contract_sid` to contract name - `contacts_list`: loads persons and companies, adds Person and Company columns - `opportunities_list`: loads companies and persons, adds Company and Person columns - `deals_list`: loads companies and persons, adds Company and Person columns - `projects_list`: loads companies and persons, resolves `company_sid` and `owner_sid` - `tasks_list`: loads milestones and persons, adds Milestone and Assignee columns (project column was already resolved) - `milestones_list`: loads projects and persons, adds Project and Owner columns **Detail views (2 handlers fixed):** - `persons_detail`: loads the linked Company (if set) and displays it as a resolved link in the detail `<dl>` - `comments_detail`: loads all 11 possible related entities (company, person, instrument, contract, opportunity, deal, project, task, milestone, transaction, contact) and renders whichever are set as resolved links in the detail view ### Bug 2 — Relationship fields preserved on update Five `*_update` handlers now perform a read-modify-write: the existing record is loaded first and any fields not present in the edit form are copied from it rather than defaulted to `None` / `Vec::new()`. - `contact_update`: preserves `contract_sid`, `opportunity_sid`, `deal_sid` - `deal_update`: preserves `instrument_sid`, `contract_sid` (handler already preserved `links`) - `task_update`: preserves `story_sid`, `depends_on`, `links` - `project_update`: preserves `end_date`, `links`, `swimlanes` - `milestone_update`: preserves `completed_date`, `completed_at`, `links` ### Files changed - `crates/hero_biz_ui/src/web/handlers/mod.rs` - `crates/hero_biz_ui/src/web/templates/mod.rs` ### Build & Tests `make build` passes with no errors or warnings. All existing tests pass (1 test in `hero_biz_ui`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_biz#11
No description provided.