docs: Document select vs multiselect operator availability in Segment filters [7.2 backport of PR #765]#773
Conversation
Clarify that multiselect fields offer a distinct operator set rather than a superset of single-select operators, per OperatorListTrait on mautic/mautic 7.x. Operator labels follow the renamed labels from mautic/mautic PR #15027.
Incorporates @patrykgruszka's review on PR mautic#765: present single-select and multiselect as two distinct operator sets rather than multiselect adding to single-select. Uses the renamed 7.x operator labels (PR #15027) verified against OperatorListTrait.php and messages.ini on mautic/mautic 7.x. Targets docs branch 7.2.
|
@promptless-for-oss please update this PR with the latest changes in #765. |
Bring over the cleanup from PR mautic#765 (commit 28ddfe7): the 'Operators for select fields' heading is plain prose that triggers no Vale rules, so the surrounding .. vale off / .. vale on directives are unnecessary.
|
Thanks, @adiati98! Done — I've brought this PR in line with the latest state of PR #765. The operator content and structure were already in sync (the two-distinct-operator-sets framing, plus the renamed 7.x labels per mautic/mautic#15027 that this 7.2 backport intentionally uses). The one outstanding difference was a leftover, unbalanced RST parses cleanly and Vale reports 0 new violations. Pushed to the branch — ready for your re-review. 🙏 |
|
@promptless-for-oss I think the wordings are different with #765. Take a look at this: Operators for select fields
===========================
Single-select fields, such as Country, Timezone, Region, Locale, and custom select fields, offer these operators:
* **Equals** - The Contact's value exactly matches the selected option.
* **Not equal** - The Contact's value doesn't match the selected option.
* **Empty** - The Contact has no value for this field.
* **Not empty** - The Contact has a value for this field.
* **Regexp** - The Contact's value matches the specified regular expression pattern.
* **Not regexp** - The Contact's value doesn't match the specified regular expression pattern.
* **Including any of** - The Contact's value matches at least one of the selected options.
* **Excluding any of** - The Contact's value matches none of the selected options.
A multiselect field can hold more than one value at once, so it offers a different set of operators:
* **Including any of** - The Contact's values include at least one of the selected options.
* **Excluding any of** - The Contact's values include none of the selected options.
* **Including all of** - The Contact's values include every selected option.
* **Excluding all of** - The Contact's values don't include every selected option.
* **Empty** - The Contact has no value for this field.
* **Not empty** - The Contact has a value for this field.
The two sets aren't identical. A multiselect field doesn't offer **Equals**, **Not equal**, **Regexp**, or **Not regexp**, since those compare against a single value. Instead, it adds **Including all of** and **Excluding all of** to match against every selected value.
.. note::
The ``Including all of`` and ``Excluding all of`` operators appear only for multiselect fields, since they require a Contact to hold more than one value. Single-select fields, such as Country, Timezone, Region, and Locale, hold only a single value, so these operators don't apply. |
Reconcile the 7.2 backport with PR mautic#765 (branch 7.1), the source of truth, per @adiati98's review on PR mautic#773. Use mautic#765's operator labels (Equals, Not equal, Empty, Not empty, Regexp, Not regexp, Including/Excluding any of, Including/Excluding all of) instead of the renamed 7.x labels, so the section matches mautic#765 verbatim.
|
@adiati98 Good catch — thank you. I've reconciled the "Operators for select fields" section in |
|
@promptless-for-oss, my bad. I didn't aware of this:
You're right. We better use the renamed operator labels, following mautic/mautic#15027. |
Revert the 'Operators for select fields' labels back to the renamed, user-friendly 7.x forms (per mautic/mautic PR #15027): 'Is equal to', 'Is not equal to', 'Is empty', 'Is not empty', 'Matches pattern', 'Does not match pattern', 'Includes any of', 'Excludes any of', 'Includes all of', 'Excludes all of'. Verified against OperatorOptions.php and messages.ini on the mautic/mautic 7.x branch. Per @adiati98's review on PR mautic#773.
|
Thanks @adiati98 — done. I've updated the "Operators for select fields" section to use the renamed, user-friendly operator labels in effect on the 7.x line per mautic/mautic PR #15027:
The two-distinct-operator-sets framing and the single-select vs multiselect field-type availability (the Includes all of / Excludes all of split cited to PR #16012) are unchanged — only the label wording reverted to the renamed 7.x form. Labels verified against |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
|
Thanks @adiati98 — both suggestions applied verbatim and pushed to the branch:
The branch has been updated, so this PR reflects the changes. |
|
|
||
| .. vale on | ||
|
|
||
| A multiselect field can hold more than one value at once, so it offers a different set of operators: |
There was a problem hiding this comment.
/aside @mautic/core-team can anyone help me to understand what is this multiselect field? Considering the previous explanation about single select field:
Single-select fields, such as Country, Timezone, Region, Locale, and custom select fields, ...
in my understanding, then the rest are multiselect fields. Looking at the UI (see the attached image below), we have more than 6 fields that are listed here. Or maybe I'm looking at the wrong thing?
I want to make sure before we merge this PR. TIA! ✨
Open this suggestion in Promptless to view citations and reasoning process
Backports the "Operators for select fields" section from docs PR #765 (branch 7.1) to branch 7.2, per @adiati98's request on PR #765. Adds the section to docs/segments/manage_segments.rst documenting which operators single-select vs multiselect fields offer in Segment filters.
Incorporates @patrykgruszka's review on PR #765: presents two distinct operator sets rather than describing multiselect as a superset that "adds" operators, noting multiselect drops Is equal to / Is not equal to / Matches pattern / Does not match pattern while adding Includes all of / Excludes all of.
Unlike the literal 7.1 text, this version uses the renamed, user-friendly operator labels in effect on the 7.x line (mautic/mautic PR #15027): for example "Is equal to", "Matches pattern", "Includes any of", "Includes all of". Field-type availability and labels verified against OperatorListTrait.php and messages.ini on the mautic/mautic 7.x branch. The Includes all of / Excludes all of availability split is cited to PR #16012. Targets docs branch 7.2.
Tip: Filter the Dashboard by labels or assignees to focus on what matters to you 🔎