When the Add values to multi-value fields option is selected, duplicates can be added. For example, a "tags" field can end up with the same tag added several times. I think the expectation would be that items will be added only if they are not yet present on the field.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nadavoid created an issue. See original summary.

nadavoid’s picture

Status: Active » Needs review
StatusFileSize
new955 bytes

Attached is a patch that prevents adding values to multi-value fields if the value is already present.

One additional note about a scenario in which this is helpful: If you're selecting a set of content, and you want to make sure they all have 3 specific tags.

douggreen’s picture

See #3120236: Make options per field for an alternative solution.

kostask made their first commit to this issue’s fork.

zero2one’s picture

Status: Needs review » Reviewed & tested by the community

The solution in the merge request does avoid duplicates.

Graber made their first commit to this issue’s fork.

graber’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.