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

CRM-21671 abstract core task #11536

Merged

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Jan 17, 2018

Overview

This adds a new CRM_Core_Task class which all the other Task classes can inherit from as it's mostly duplicated code.
Split from CRM-21391 so it can be reviewed more easily.

Before

Lot's of duplicated code

After

Once CRM-21391 is merged, mostly shared code - easier to maintain and less buggy :-)


@mattwire
Copy link
Contributor Author

Jenkins test this please

@seamuslee001
Copy link
Contributor

@mattwire error is

PHP Parse error: syntax error, unexpected 'PRINT' (T_PRINT), expecting identifier (T_STRING) in CRM/Core/Task.php on line 44 Errors parsing CRM/Core/Task.php```

@eileenmcnaughton
Copy link
Contributor

I merged the other one so might need a clean up - can you include just one of the child classes in here too ?

@mattwire
Copy link
Contributor Author

Jenkins test this please

@mattwire mattwire force-pushed the CRM-21671_abstract_core_task branch 2 times, most recently from e0bc88e to 7c26e86 Compare January 18, 2018 15:38
@eileenmcnaughton
Copy link
Contributor

test this please

@mattwire
Copy link
Contributor Author

@eileenmcnaughton Yay, passes tests :-)


static $objectType = NULL;

public static function tasks() {
Copy link
Member

Choose a reason for hiding this comment

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

This function could use a docblock.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@colemanw Agreed. I've gone through and added more comments/docblocks

@eileenmcnaughton
Copy link
Contributor

I read through this code & tested doing a participant search & choosing various actions. I hit no issues and the code is clearly an improvement.

I think we are OK without a unit test as this is very form layer and there is no clear path to add tests here - although it might be nice to think of some

@eileenmcnaughton eileenmcnaughton merged commit b252e89 into civicrm:master Jan 21, 2018
@mlutfy mlutfy added this to the 4.7.31 milestone Feb 9, 2018
@kngs
Copy link
Contributor

kngs commented Jun 15, 2018

After a recent upgrade from 4.7.29 to 5.2.1 (Joomla) I experienced the following problem:

After doing an Events/Find Participants search and selecting some or all participants, the "Print selected rows" option in no longer appearing in the Actions dropdown.

An Advanced Search when displaying results as Event Participants also is missing this option. The option does appear when results are displayed as Contacts.

I have verified the same behavior on dmaster.demo (running 5.4.alpha1).

Issue filed by Pradeep: https://lab.civicrm.org/dev/core/issues/185

@mattwire mattwire deleted the CRM-21671_abstract_core_task branch September 25, 2018 11:06
@mattwire mattwire mentioned this pull request Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants