Merge tags and bool fields of parts

This commit is contained in:
Jan Böhmer 2023-11-21 00:18:10 +01:00
parent e7b766906d
commit 478d5e2a3a
3 changed files with 112 additions and 1 deletions

View file

@ -55,7 +55,12 @@ class PartMerger implements EntityMergerInterface
//We assume that the higher value is the correct one for minimum instock
$this->useLargerValue($target, $other, 'minamount');
//We assume that a part needs review and is a favorite if one of the parts is
$this->useTrueValue($target, $other, 'needs_review');
$this->useTrueValue($target, $other, 'favorite');
//Merge the tags using the tag merger
$this->mergeTags($target, $other, 'tags');
return $target;
}