Hello. I'm using the Custom Field Suite addon to create a custom field of the type "Jira Expressions field" and I would like to use the value of this field in a JQL query.
I'm trying to created a field that identifies the worklog entries generated after the start of the current sprint and now I would like to use this field in a Gadget on my dashboard to add the hours used, but I cannot access the value.
Currently the filter looks like this:
issue.worklogs?
.filter(c => c.created > issue.sprint.startDate)?
.reduce((result, worklogItem) =>
(result+worklogItem.timeSpent),0)
I also tried to create this way. The field was generated correctly but I can't read the data either:
issue.worklogs?
.filter(c => c.created > issue.sprint.startDate)?
.reduce((result, worklogItem) =>
result.set("Total",Number((result["Total"] || 0) + worklogItem.timeSpent))
,new Map())
On the screen it appears correctly:

And analyzing the JIRA return in the API I see this:

References:
Jira Expressions Types
Jira Expressions
Please can you help me to solve this problem?
Thank you very much!