Skip to content

Commit

Permalink
Allow departments to have too few confirmers, if it is blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtronics committed Jan 9, 2025
1 parent 658b7d4 commit 899b832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Entity/Department.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Department implements DBElementInterface, NamedElementInterface, Timestamp
*/
#[ORM\ManyToMany(targetEntity: Confirmer::class, inversedBy: 'departments')]
#[ORM\JoinTable(name: 'departments_confirmers')]
#[Assert\Expression("value.count() >= this.gettype().getMinimumRequiredConfirmers()",
#[Assert\Expression("value.count() >= this.gettype().getMinimumRequiredConfirmers() or this.isBlocked()",
message: 'validator.two_few_confirmers')]
#[Assert\Unique]
private Collection $confirmers;
Expand Down
3 changes: 2 additions & 1 deletion translations/validators.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
<segment>
<source>validator.two_few_confirmers</source>
<target>Zu wenige Bestätigungspersonen!
Ein FSR benötigt mindestens 2 Bestätigungspersonen, Referate mindestens 1 Person!</target>
Ein FSR benötigt mindestens 2 Bestätigungspersonen, Referate mindestens 1 Person!
(Alternativ kann die Struktur gesperrt werden)</target>
</segment>
</unit>
<unit id="aKu1fAw" name="validator.supporting_amount.needed_for_supporting_funding_id">
Expand Down

0 comments on commit 899b832

Please sign in to comment.