Closed ericbolikowski closed 1 month ago
The TpCompanyProfilesSalesforceEventHandlerService
class was updated to include a new property, state
, in the updatedCompanyProfileProps
object. This ensures that the status
does not revert to an old value when a Salesforce event triggers the update, by setting state
to payload.newStatus
.
File | Change Summary |
---|---|
apps/nestjs-api/src/tp-company-profiles/tp-company-profiles-salesforce-event-handler.service.ts |
Updated TpCompanyProfilesSalesforceEventHandlerService class to include { state: payload.newStatus } in updatedCompanyProfileProps . |
In code's domain, a change so bright,
A status kept, now future's light.
Withstate
secure, events align,
Profiles true, in Salesforce's sign.
A tiny tweak, yet change profound,
In handlers' care, solutions found.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@astkhikatredi this is now deployed
What Github issue does this PR relate to? Insert link.
What should the reviewer know?
This PR fixes a bug where a Company Profile's status would "magically" jump back to its previous value after a Salesforce user set it to
Profile Approved
. For example, when switching status fromDrafting Profile
toProfile Approved
, the status would be set back to "Drafting Profile".See the detailed comment inside the changed code for what specifically caused the bug and how it's been solved.
Summary by CodeRabbit