Unable to display To Dos in Flyout with error "Invalid length parameter passed to the LEFT or SUBSTRING function"
search cancel

Unable to display To Dos in Flyout with error "Invalid length parameter passed to the LEFT or SUBSTRING function"

book

Article ID: 444196

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

A user is not able to view To Dos on the Task flyout, but can see them in the To Dos without an issue.  There is no apparent error on screen, it just says no rows available. 

ERROR 2026-06-03 08:27:27,967 [http-nio-8082-exec-64] odata.EntitiesResponseImpl (clarity:XXXXXXXXXX:90330627__8C2EC6D8-C414-4BA7-8A56-FD9479EB3DFC:PPM_REST_API) (6a1db672-2dd8-4e6b-a7b1-a21845845d88) Exception reading objects: oba_todo
com.niku.union.persistence.PersistenceException:
SQL error code: 537
Error message: Invalid length parameter passed to the LEFT or SUBSTRING function.
Executed:
select odf_q.* , (select top 1 full_name from ( SELECT SRM_RESOURCES.ID AS ID,
SRM_RESOURCES.LAST_NAME AS LAST_NAME,

Environment

Clarity - All Supported Releases with SQL Server

Cause

A custom field has bad data

Resolution

1. Identify the bad records:

SELECT 
    t.id, 
    t.code, 
    t.name, 
    c.test_field
FROM 
    oba_todos t
JOIN 
    odf_ca_oba_todo c ON t.id = c.id
WHERE 
    ISJSON(c.test_field) = 0 
    AND CHARINDEX('<plain-text>', c.test_field) > 0 
    AND CHARINDEX('</plain-text>', c.test_field) < (CHARINDEX('<plain-text>', c.test_field) + 12);

2. Update the field from UI or via SQL update to NULL