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

dev/core#2885 Expose Custom Fields on the New Group form of the Add To Group task #21716

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

jaapjansma
Copy link
Contributor

Overview

Adds custom fields to the screen when creating a new group from the search action Group - Add contacts to group.

Before

No custom fields are visible. See screenshot below.

Screenshot_20211004_120628

After

Custom fields are visible. See screenshot below.

Screenshot_20211004_120405

Comments

See https://lab.civicrm.org/dev/core/-/issues/2885

@civibot
Copy link

civibot bot commented Oct 4, 2021

(Standard links)

@civibot civibot bot added the master label Oct 4, 2021
@demeritcowboy
Copy link
Contributor

Thanks. Makes sense and runs ok.

  • General standards
    • [r-explain] PASS
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] PASS
  • Developer standards
    • [r-tech] PASS
    • [r-code] PASS
    • [r-maint] It's forms but it might be doable to at least test that postProcess recognizes the custom fields
      • Something like this might work - need to adjust a bit:
      $form = $this->getFormObject('CRM_Contact_Form_Task_AddToGroup', [
        'title' => 'group1',
        ... etc ...
        'custom_7' => 'abc',  // need to create this field first
      ]);
      $form->postProcess();
      $group = $this->callAPISuccess('Group', 'getsingle', [
        'title' => 'group1',
        'return' => ['custom_7'],
      ]);
      $this->assertEquals('abc', $group['custom_7']);
    • [r-test] PASS

@jaapjansma
Copy link
Contributor Author

I have added a unit test. For the task add to group no test existed so I have added a test for the adding to an existing group and for adding to a new group with a custom field.

@colemanw
Copy link
Member

colemanw commented Oct 6, 2021

@jaapjansma can you please squash your 3 commits?

Added test

Added test
@jaapjansma
Copy link
Contributor Author

@colemanw I have squashed my commits into one.

@colemanw
Copy link
Member

colemanw commented Oct 6, 2021

Looks good :)

@colemanw colemanw merged commit a5b8348 into civicrm:master Oct 6, 2021
@demeritcowboy
Copy link
Contributor

Thanks @jaapjansma 👍

@mlutfy mlutfy changed the title Fix for dev/core#2885 dev/core#2885 Expose Custom Fields on the New Group form of the Add To Group task Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants