Skip to content
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

New webhook: Contact Company Subscription Change #8218

Merged
merged 3 commits into from
Aug 16, 2020

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Dec 11, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

New webhook event send when contact's companies are changed (added/removed).

Response return

  • added (true or false in case if company is removed from contact)
  • contact object
  • company object in this event (added/removed)

Steps to test this PR:

  1. Load up this PR
  2. Create webhook with Contact Company Subscription Change Event (test endpoint could be take from webhook.site)
    image
  3. Try create contact + assign/remove companies
  4. Check webhook.site if your response contains
  • added (true or false if removed)
  • contact
  • company

List deprecations along with the new alternative:

List backwards compatibility breaks:

@kuzmany kuzmany added enhancement Any improvement to an existing feature or functionality ready-to-test PR's that are ready to test labels Dec 11, 2019
@kuzmany kuzmany added this to the 2.16.0 milestone Dec 11, 2019
@npracht npracht removed this from the 2.16.0 milestone Jan 23, 2020
@npracht npracht added needs-rebase PR's that need to be rebased and removed ready-to-test PR's that are ready to test labels Apr 4, 2020
@npracht
Copy link
Member

npracht commented Apr 4, 2020

Hi there!
It has been decided to not create any extra Mautic 2 minor versions (which means no more features in M2) knowing that Mautic 3 is coming very soon.

We now want to integrate your contribution in the Mautic 3 roadmap as 3.1.0 candidate.

How to do?

  1. Check if your feature or enhancement is still missing and relevant in Mautic 3
  2. If Yes: rebase your PR against the 3.x branch
  3. If No: please consider closing your PR if you are absolutely sure that the feature has made it into Mautic 3 already

Please report results by commenting on your PR to make us administration easier.


You can more information on how to do all of that on this blog post "Getting you PR ready for Mautic 3".

@npracht npracht added this to the 3.1.0 milestone Apr 4, 2020
@npracht npracht added this to Pending feedback in 3.1.0 Apr 6, 2020
@kuzmany kuzmany force-pushed the webhook-lead-category-change branch from 6ea9c1b to 6664966 Compare April 15, 2020 19:01
@kuzmany kuzmany changed the base branch from staging to 3.x April 15, 2020 19:01
@kuzmany kuzmany added ready-to-test PR's that are ready to test and removed needs-rebase PR's that need to be rebased labels Apr 15, 2020
@kuzmany
Copy link
Member Author

kuzmany commented Apr 15, 2020

Rebsed

@TravisBuddy
Copy link

Travis tests have failed

Hey @kuzmany,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 05bd4c50-7f4e-11ea-b434-f745fa9560ca

@RCheesley RCheesley changed the base branch from 3.x to staging June 17, 2020 11:41
@RCheesley RCheesley added companies Anything related to companies contacts Anything related to contacts labels Jul 23, 2020
mabumusa1
mabumusa1 previously approved these changes Aug 14, 2020
Copy link
Member

@mabumusa1 mabumusa1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this PR, it works as expected I got a webhook on company change and it included the company that got added correctly to the contact

RCheesley
RCheesley previously approved these changes Aug 15, 2020
Copy link
Sponsor Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works great - adding and removing companies - and the content includes the information about both the company and the contact.

Thanks for the PR @kuzmany 🙇

@RCheesley RCheesley added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed ready-to-test PR's that are ready to test labels Aug 15, 2020
@RCheesley RCheesley removed this from Pending feedback in 3.1.0 Aug 15, 2020
@RCheesley
Copy link
Sponsor Member

Marking this as RTC subject to the checks being passed successfully - I have a suspicion it might possibly need tests but we'll see!

@codecov
Copy link

codecov bot commented Aug 15, 2020

Codecov Report

Merging #8218 into staging will increase coverage by 0.01%.
The diff coverage is 76.92%.

Impacted file tree graph

@@              Coverage Diff              @@
##             staging    #8218      +/-   ##
=============================================
+ Coverage      29.89%   29.90%   +0.01%     
- Complexity     33278    33281       +3     
=============================================
  Files           1938     1938              
  Lines         115242   115255      +13     
=============================================
+ Hits           34447    34463      +16     
+ Misses         80795    80792       -3     
Impacted Files Coverage Δ Complexity Δ
...les/LeadBundle/EventListener/WebhookSubscriber.php 70.31% <76.92%> (+1.68%) 12.00 <3.00> (+3.00)
...undles/LeadBundle/Event/LeadChangeCompanyEvent.php 81.25% <0.00%> (+37.50%) 7.00% <0.00%> (ø%)

@dennisameling
Copy link
Member

@kuzmany I just added a test for this PR, if Travis/Codecov pass this is RTC 👍

@dennisameling dennisameling merged commit 5ca3b84 into mautic:staging Aug 16, 2020
@mautibot
Copy link

This pull request has been mentioned on Mautic Community Forums. There might be relevant details there:

https://forum.mautic.org/t/mautic-3-1-new-beginnings/15787/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
companies Anything related to companies contacts Anything related to contacts enhancement Any improvement to an existing feature or functionality ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants