I actually looked into this a bit more, I could write you a filter, that would be specific to your need, but it would pretty much only be useful for you and in your exact methodology. However, after digging further into the LexerBuilder than I have ever looked I discovered, there actually is an OR Criteria. I’m not 100% sure how to exploit this, or if I even could, but I have some thoughts, which would be the better way to approach it…so that everyone can benefit. I just need to get some time to think about it and experiment.
You can see the OR criteria in action by simply using a filter more than once, i.e.
assignee:name1 assignee:name2, but changing the filter brings it out of the OR loop, which becomes an AND…so basically
assignee:name1 assignee:name2 metakey:owner metaval:name is Assignee name1 OR Assignee name2 AND Metakey owner AND Metaval name.
Pretty sure the best way to utilize the OrCriteria.php would be at the core, but not sure I would trust myself with that. As a filter/plugin, I could exploit it, by creating a filter that allows you to choose your search table, search column, and search value; but you would also need to specify the return and query in the task table…so it would get long and confusing…and to get what you want, it would look like,
orfilter:users+name+searchname+id+owner_id orfilter:task_has_metadata+name+searchfield+task_id+id orfilter:task_has_metadata+value+searchvalue+task_id+id
And boy, does that look confusing…but since they would all be through the same filter, they would have the OR criteria…and it would find Assignees with the Name searchname OR Tasks with the Custom Field searchfield OR Tasks with the Custom Field Value searchvalue…which now that I think about it, is NOT what you want!!! see even I am confused…it would look like this then…
orfilter:users+name+searchname+id+owner_id metakey:searchfield orfilter:task_has_metadata+value+searchvalue+task_id+id
and now it would find Assignees with the Name searchname OR Tasks with the Custom Field Value searchvalue AND Tasks with the Custom Field searchfield.
This is all good in theory, but pretty sure the +'s would get stripped out…so, I’d have to figure out some serperators…
I’ll think about this some more…