How to make the assignee of user task case insensitive?


#1

how to make the assignee of user task case insensitive?

I want to retrieve list of tasks assigned to a user with case insensitive search. How do i do that? Currently, when i use https://docs.camunda.org/manual/7.5/reference/rest/task/post-query/ API with “assignee” in request data, it returns the tasks based on assignee(case sensitive).


#2

Hi @sindhu_veladi,

you could add a task listener to the assignment event and convert the assignee to lowercase (or UPPERCASE). See https://docs.camunda.org/manual/7.10/user-guide/process-engine/delegation-code/#task-listener.

Then you can relay on the formatting while querying for tasks.

Hope this helps, Ingo


#3

you can either store the assignee as always either lowercase or uppercase while assigning a task.

(or)

If you want case insensitive only during searching for tasks, then you have to store the assignee value as part of task variables in uppercase or lowercase format. So while querying you can convert to uppercase or lowercase of assignee.

Note: There’s no such camunda REST API will search for assignee case insensitive way.


#4

Thanks guys, it helped me.