- Restore blue PageHeader on Dashboard (/app-components) - Update homepage (/) with subtle header design without blue bar - Add uniform PageHeader styling to application edit page - Fix Rapporten link on homepage to point to /reports overview - Improve header descriptions spacing for better readability
4.0 KiB
Schema Discovery and Data Loading Flow
Overview
This document describes the logical flow for setting up and using CMDB Insight, from schema discovery to data viewing.
Implementation Verification
✅ Data Structure Alignment: The data structure from Jira Assets REST API matches the discovered schema structure. There are no fallbacks or guessing - the system uses the discovered schema exclusively.
How It Works
-
Schema Discovery (
/api/schema-configuration/discover):- Discovers all schemas and object types from Jira Assets API
- Stores them in the
schemasandobject_typesdatabase tables
-
Attribute Discovery (automatic after schema discovery):
schemaDiscoveryService.discoverAndStoreSchema()fetches attributes for each object type- Stores attributes in the
attributestable with:jira_attr_id- Jira's attribute IDfield_name- Our internal field name (camelCase)attr_type- Data type (text, reference, integer, etc.)is_multiple- Whether it's a multi-value field
-
Data Loading (when syncing):
jiraAssetsClient.parseObject()uses the discovered schema from the database- Maps Jira API attributes to our field names using
jira_attr_idmatching - No fallbacks - if a type is not discovered, the object is skipped (returns null)
Code Flow
Schema Discovery → Database (attributes table) → schemaCacheService.getSchema()
→ OBJECT_TYPES_CACHE → jiraAssetsClient.parseObject() → CMDBObject
User Flow
Step 1: Schema Discovery & Configuration
Page: /settings/schema-configuration
-
Discover Schemas: Click "Ontdek Schemas & Object Types"
- Fetches all schemas and object types from Jira Assets
- Stores them in the database
-
Configure Object Types: Enable/disable which object types to sync
- By default, all object types are disabled
- Enable the object types you want to sync
-
Manual Sync: Click "Nu synchroniseren" (in CacheStatusIndicator)
- Loads data from Jira Assets REST API
- Uses the discovered schema structure to map attributes
- Stores objects in the normalized database
Step 2: View Data Structure
Page: /settings/data-model
- View the discovered schema structure
- See object types, attributes, and relationships
- Verify that the structure matches your Jira Assets configuration
Step 3: Validate Data
Page: /settings/data-validation
- Validate data integrity
- Check for missing or invalid data
- Debug data loading issues
Step 4: Use Application Components
Pages: /application/overview, /app-components, etc.
- View and manage application components
- All data uses the discovered schema structure
Navigation Structure
The navigation menu follows this logical flow:
-
Setup - Initial configuration
- Schema Configuratie (discover + configure + sync)
- Datamodel Overzicht (view structure)
-
Data - Data management
- Datamodel (view structure)
- Data Validatie (validate data)
-
Application Component - Application management
- Dashboard, Overzicht, FTE Calculator
-
Rapporten - Reports and analytics
-
Apps - Additional tools
- BIA Sync
-
Instellingen - Advanced configuration
- Data Completeness Config
- FTE Config
-
Beheer - Administration
- Users, Roles, Debug
Key Points
- ✅ No guessing: The system uses the discovered schema exclusively
- ✅ No fallbacks: If a type is not discovered, objects are skipped
- ✅ Schema-driven: All data mapping uses the discovered schema structure
- ✅ Database-driven: Schema is stored in the database, not hardcoded
Troubleshooting
If data is not loading correctly:
- Check Schema Discovery: Ensure schemas and object types are discovered
- Check Configuration: Ensure at least one object type is enabled
- Check Attributes: Verify that attributes are discovered (check
/settings/data-model) - Check Logs: Look for "Unknown object type" or "Type definition not found" warnings