Page 1 of 1

Automation /Approval Help

Posted: 22 Apr 2024, 21:52
by Popovichga
Hi, I'm checking to see if anyone could provide me with some guidance.

I have an entity that has several sub-entities underneath it that require approval, and they also have an automatic status assigned to them.

The automatic statuses I have for the sub-entities are pending, expired, and active.

I want to have a field inside the main entity that would signify that all of the sub-entities have at least one entry with an approval status as well as an approved status for each.

This might not be the best way to achieve my goal, so I'm open to suggestions! The goal is to track a person's certificates, have a specific user group approve such certificates, and then track when such certificates expire to have the user upload a new valid certificate for review (cycle continues)

Re: Automation /Approval Help

Posted: 23 Apr 2024, 08:53
by support
Check function https://docs.rukovoditel.net/index.php?p=48
where you can count items in subentity. In video example you can see count Tasks per Project. In Count function you can set own filters. So you can count items with specific filter.

Re: Automation /Approval Help

Posted: 27 Apr 2024, 01:36
by Popovichga
Thanks for the great idea!

One more addition process I’m struggling to overcome is the ability to auto assign the approval user via a parent assigned users field.

Any ideas or thoughts

Re: Automation /Approval Help

Posted: 27 Apr 2024, 10:12
by eddydeniro
You mean your parent entity has field Users and whoever chosen will be assigned for approval in those 4 subentities?

You can automate this by using PHP code. You have to insert record in each subentity (app_entity_XX) with the same parent_item_id and user_id in corresponding fields, and also insert field_id and user_id in each app_entity_XX_values.
I believe it's a one-to-one relationship between the parent and each subentity. If so, before executing insert query, dont forget to check if the parent_item_id already exists in the subentities. Otherwise, one record will be created every time you update the parent.
Popovichga wrote: 27 Apr 2024, 01:36 Thanks for the great idea!

One more addition process I’m struggling to overcome is the ability to auto assign the approval user via a parent assigned users field.

Any ideas or thoughts