Jira custom field (type: object) search on rendered value

Hi Everyone,

I’m creating a jira:customField module in my Forge app and I went for the object type as it seems the best fit for my use case.

Now when I try to search issue filtered on values for my custom field, I don’t have the string search operators available. No = operator and no search suggestions in the list. Instead I have a ~ operator which means contains instead of matches.

Is there a way I could tell Jira to perform a string search on my field, that would look into rendered values to compute search results?

here’s how my manifest looks:

Thanks
Antoine

5 Likes

Hey, @AntoineBenain,

You can’t search by the rendered value, but you can add field properties to search by, as described here: https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#object-type-jql-search.

The reason why searching by the rendered value is not directly possible is that the rendered value is computed dynamically on read, and for search to work, we need to be able to have values indexed beforehand. One may argue that we could just evaluate the formatter on every value change and index that. However, the formatter expressions are powerful enough to return different results for different environment states (e.g. user, time), so this kind of approach wouldn’t produce correct results in all cases.

I hope this helps!