Closed ashrafalzyoud closed 2 years ago
@picman
Hi,
You should run this code in BEFORE SAVE section of your SUBTASK:
if self.parent
if parent.children.count == 5
errors.add(:base,"The maximum number of subtasks has been reached. Creating additional subtasks is not allowed.")
end
end
I hope it helps!
if u can help me plz how i can let user added only limit of subtask depend in custom_field_value type integer example if custome_field_value_1= 5 this mean user can added only maximum 5 subtask