When and why is a ProjectMember updated in relation to a Project?

Hi Guys,
I need your help in trying to understand the relationship between Project and ProjectMember when supplying data to the Project entity via a Databridge integration.

Some background: Every night we supply around 400 records to the Project entity, some are new but most are updates. The updates mostly consist of an updated UpdateDate, so most records are actually unchanged except for this date.
This triggers the webhook (as expected) and we receive a similar number of 'project.changed' notifications.

However, the 'projectmember.changed' webhook fires ALOT of time simultaneously at the same time (we're talking 5000+ records!)
I would understand it if the webhook generally fires for all projectmembers when the project they are tied to is updated. But the updates only trigger some of the projectmembers and I cannot seem to find a pattern to which members get updated and which do not.

In a specific example a project with 121 projectmembers only updates 53 of these as the project is updated. One of these projectmemberids have a contactid and a personid tied to it. However, both of these have been anonymized and last updated in 2020. I wonder why such a projectmember is affected by a Project update at all?

RE: When and why is a ProjectMember updated in relation to a Project?

Hi Henrik,

When a ProjectEntity is saved, there is some processing on the ProjectEntity.ProjectMember property, but any changes that do occur there are not saved back to the ProjectMembers table. Only when there are actual changes to the project member table do the projectmember webhook events get raised/fired.

That said, when a ProjectEntity is saved, there is a side-effect during the Nested-Persist routine that loops through all of the project members and updates their Rank value. I believe this is what you are observing. Some may have the same value and therefore would not be affected, while others are updated and would cause the changed webhook.

Architectually, this is by design, but I can see how this is not desirable in this circumstance.

 

 

Von: Tony Yates 15. Sep 2021

RE: When and why is a ProjectMember updated in relation to a Project?

Check the Changes property you receive, that will tell you what field on the project member for changed, and if you can ignore the call.

 

https://docs.superoffice.com/api/netserver/webhooks/reference/project-member-events.html

Von: Christian Mogensen 15. Sep 2021

RE: When and why is a ProjectMember updated in relation to a Project?

Good idea, Christian! I will see if I can make that work.

Von: Henrik Povlsen 17. Sep 2021