What OData Does in Risksheet
OData serves as the structured communication protocol between the Risksheet client (the JavaScript grid running in your browser) and the server-side service layer. Every interaction with the grid — loading risk items, editing cell values, creating links, deleting rows — translates into OData requests. Think of OData as a standardized language that the grid speaks to the server. Instead of using custom, proprietary message formats, Risksheet uses the widely adopted OData protocol, which means the data exchange follows predictable patterns for queries, updates, and transactions.CRUD Operations
The OData service layer supports the full set of data operations:Read (GET)
Grid item retrieval loads all work items for a specific document, with optional support for viewing historical revisions or baselines. The service also supports filtered queries for linked items, using OData filter expressions likesubstringof for search functionality.
Create (POST)
New work items created in the grid are submitted via POST requests. Items with temporary IDs (prefixed with*) are mapped to permanent Polarion IDs after creation. The service supports creating master items and linked items within a single transaction.
Update (PATCH/PUT)
Cell edits are submitted as PATCH (partial update) or PUT (full update) requests. The service handles preprocessing of linked items, resolving any temporary IDs to their permanent Polarion equivalents before applying changes.Delete (DELETE)
Deletion behavior depends on the item context:| ID Format | Behavior |
|---|---|
| Standard ID | Deletes the actual work item |
ID ending with ;* | Unlinks the task relationship without deleting the work item |
project/itemId format | Cross-project deletion or unlinking |
The exact OData endpoint URLs and query parameter formats may vary depending on your Risksheet version. Check the Reference section for current API specifications.
Column Type Mapping
Risksheet column types map to OData EDM (Entity Data Model) primitive types for data exchange. This mapping determines how values are serialized over the wire:| Risksheet Type | OData EDM Type | Notes |
|---|---|---|
text | String | Default for unrecognized types |
int | Int64 | 64-bit integer precision |
float | Double | Double-precision floating point |
rating | Int32 | 32-bit integer (same as int for ratings) |
boolean | Boolean | True/false values |
currency | Decimal | High-precision decimal for financial data |
date | Date | Date-only values |
datetime | DateTimeOffset | Date with time and timezone |
time | DateTimeOffset | Time values with timezone context |
duration | String | Duration stored as string despite being temporal |
multiEnum | String | Colon-separated syntax for multiple values |
Column types support additional parameters after the type name, separated by colons (e.g.,
multiEnum:severity,priority). The system extracts the type prefix before the first colon for mapping purposes.Transaction Management
All data-modifying operations (create, update, delete) execute within server-side transactions. The transaction lifecycle follows a strict pattern:- Begin — A new transaction context is established.
- Execute — All operations within the save batch are applied.
- Commit — On success, all changes are persisted atomically.
- Rollback — On failure, all changes are reverted to prevent partial updates.
Search and Autocomplete
The OData layer powers the item suggester and autocomplete functionality in link columns. When you type into anitemLink, multiItemLink, or taskLink column, the grid sends OData queries with filter expressions to find matching work items.
The search supports configurable behaviors:
- Minimum query length — Multi-item link searches require at least 3 characters before querying.
- Custom query factories — Administrators can configure query factory functions that add business logic to filter results (e.g., restricting to specific projects or work item statuses).
- Local changes integration — Autocomplete results include items created in the current session but not yet saved, allowing you to link to newly created items immediately.
Cross-Project Support
The OData service handles work items from different Polarion projects using anIdProject format (project/itemId). When operating across project boundaries, the system automatically qualifies project-less IDs with the appropriate project identifier. This enables cross-project risk analysis views where risk items, requirements, and mitigations span multiple projects.
Sorting
The grid provides intelligent sorting through the OData collection view:- Work item IDs sort alphanumerically, ensuring that
PROJECT-2comes beforePROJECT-10. - Outline numbers sort hierarchically, so
1.2comes before1.10. - Multi-item links sort by concatenated labels of all linked items.
- Configurable initial sort uses the
sortByproperty, with~prefix for descending order (e.g.,["~dueDate", "priority"]).
Related Topics
For details on how data synchronization works end-to-end, see Data Synchronization. To understand the architecture of the communication layers, see Architecture. For exact API endpoint documentation, see the Reference.Sources
Sources
Source Code
RisksheetDataStorage.javaColumnTypeManager.javaTextEditor.tsMultiItemLinkEditor.tsCellEditorFormatter.ts