-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Salesforce - truncate activity name to 80 characters #8989
Salesforce - truncate activity name to 80 characters #8989
Conversation
Closing and re-opening for Travis |
Codecov Report
@@ Coverage Diff @@
## 3.0 #8989 +/- ##
============================================
- Coverage 35.24% 35.23% -0.01%
- Complexity 27900 27949 +49
============================================
Files 1731 1731
Lines 96443 96561 +118
============================================
+ Hits 33987 34020 +33
- Misses 62456 62541 +85
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE FOR 2nd REVIEWER: code review is enough, the PR works as described
Can confirm the bug (took quite some time to set up the whole integration, good lord 😂):
{
"body": [
{
"message": "Timeline Name: data value too large: Page hit - https:\/\/mautic3.ddev.site\/test-salesforce-very-long-name-blablabalbaasdfsdfjsdlkfjsdlkfjsdlfkasdfjkhsfkljhsdfljkhsdjklfhsdljkfsjkldfhskjldhflsjkhfjklsdhfkljsdhfkljsdhlfkjhdflksdhflkshflksdhflkdshalkfjhlkdjhfslkhfldk (max length=80)",
"errorCode": "STRING_TOO_LONG",
"fields": [
"Name"
]
}
],
"httpHeaders": {},
"httpStatusCode": 400,
"referenceId": "5-00Q2X00001MNkPDUA1"
}
After applying this PR, the activity is created as expected in Salesforce 🚀
LGTM 🎉 |
Please be sure you are submitting this against the staging branch.
Description:
Salesforce activities sync https://docs.mautic.org/en/plugins/salesforce stop working If activity name has more like 80 characters. And it happend in many cases for us, for example Page hit.
Because we are not able to extend this limit (hardcoded limit by Salesforce), this PR truncates the activity name.
Steps to reproduce the bug:
Instead wasting time, just code review should be enoght.
bin/console mautic:integration:synccontacts -i Salesforce --env=dev
)php bin/console mautic:integration:pushactivity -i Salesforce --env=dev
)Steps to test this PR: