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

Fix campaign action to link contact with custom item UI issue #296

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

npracht
Copy link

@npracht npracht commented Jan 27, 2023

Q A
Bug fix? (use the a.b branch)
New feature/enhancement? (use the a.x branch)
Deprecations?
BC breaks? (use the c.x branch)
Automated tests included?
Related user documentation PR URL not relevant
Related developer documentation PR URL not relevant
Issue(s) addressed

Description:

In campaign when you try to link to a custom item, when you type in the input it should suggest the list of custom item existing (cf:acquia/mc-cs-plugin-custom-objects/wiki/Campaign-Events).

But the list is not displayed. I tried to write the custom item name, but doesn't work on contacts, the link is not done when campaign triggers.

Steps to test this PR:

  1. Open this PR for testing locally (see docs on testing PRs here)
  2. Be sure to have custom objects and items existing
  3. Create a campaign and try to select an existing item, le list is not showing

@ShareBtech
Copy link

I have tried this fix and it is not working for me. Tested on 4.4.4 and 4.4.0

@lopesandre
Copy link

I've tested in 4.4.5 and this fix it does not work for me.

The only way that I can make it work is to set the hidden input value with the ID of the custom object manually (using the browser inspector).

For example, if you want to link the ID 2, just do:

document.getElementById("campaignevent_properties_linkCustomItemId").value = "2";

Then confirm that the ID is set:

document.getElementById('campaignevent_properties_linkCustomItemId').value

Then, just save it and it will work.

@jessebrightman
Copy link

Hello,

There is an error in the fix. The line is missing an opening parenthesis "(" The corrected code at line 13 should read:

if ((settings.type === 'POST' || settings.type === 'GET') && settings.url.indexOf('s/campaigns/events') >= 0) {

I have tested it and it works on v4.4.9

@RCheesley
Copy link
Contributor

@npracht can you take a look at the feedback above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants