Add search criteria for with specific customFields data

Hello.

I have jira plugin with two customFields installed:

  1. The first one contains data like {name: “name”, id: “2734432”: flag: “true”}
  2. The second one may just contains some data or not.

My clients would like to search for issues with some kind of “mode”:

  1. First mode: first customField has flag set to true
  2. Second mode: first customField has flag set to false,
  3. Second customField is set or not.
  4. Non of the customFields are set.

The question is: Is there any way to add something like new “search criteria” called “MyCustomFieldsMode” which will search for issue with above “modes”. I would rather not to add new customField “MyMode” which will contain data about the mode. Is there any way to make it?

Create filters for each mode and shared them.