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-16865: Mass Dedupe Workflow Improvements #6432

Merged
merged 14 commits into from
Aug 27, 2015

Conversation

deepak-srivastava
Copy link
Contributor

* @return string
*
*/
public static function encodeDataTable($params, $iTotal, $iFilteredTotal, $selectorElements) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this precede the datatable updates @colemanw did?

Copy link
Member

Choose a reason for hiding this comment

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

@deepak-srivastava this function does not look necessary.
It seems to be duplicating the legacy code in encodeDataTableSelector which is deprecated. In 4.7+ we simply use CRM_Utils_JSON::output() to output json.

@eileenmcnaughton
Copy link
Contributor

Just a quick note - we've been doing a good job of getting comment block-consistency in core (ie. working towards all functions havin a comment block) - I see there are quite a few new functions without them - could you add them?

The full phpcs standard is a block for all functions, there should be a one-line description ending in a full stop and if appropriate a blank line before further comments, every param should have a type (& preferably a description - but we've made less progress on this).

@colemanw
Copy link
Member

colemanw commented Aug 6, 2015

The datatable implementation here seems to be modeled on legacy code. In 4.7+ we do not invoke datatables like $('#myTable').datatable() as this is handled automatically by giving it the css class crm-ajax-table. We also use standard json_encode based methods for returning json instead of the legacy encodeDataTableSelector function.

Please see the commits in https://issues.civicrm.org/jira/browse/CRM-16353 for example ad280fb

@kurund
Copy link
Contributor

kurund commented Aug 8, 2015

@deepak-srivastava looks like PR has gone stale, can you please rebase

…7e53e0 (re-order columns and disable sorting for icon column)
… conflict labels & values in conflict. 3. layout for conflict column - new line after every conflict info. 4. 'vs' formatting. 5. Add permission for forced merges. 6. Fix for: 'One of parameters (value: null) is not of the type Money/Timestamp' errors during batch merges. 7. allow hooks to decide if to skip merges even in aggressive mode. 8. for conflicts screen provide option for safe merges as well
@deepak-srivastava
Copy link
Contributor Author

@colemanw Thanks. Think i've got it mostly working with crmAjaxTable plugin - deepak-srivastava@f2515ec

Not sure about these two points (and anything else that you might see?) :

  1. rowCallback method here - https://github.com/civicrm/civicrm-core/pull/6432/files#diff-73b05598b12baccffc7108bd7da96d44R234
  2. className property - https://github.com/civicrm/civicrm-core/pull/6432/files#diff-73b05598b12baccffc7108bd7da96d44R218 (https://datatables.net/reference/option/columns.className)

Any ideas / pointers ?

@colemanw
Copy link
Member

Thanks for getting rid of that extra encodeDataTable function. Much cleaner. Will comment inline for your other questions.

{data: "dst_postcode"},
{
data: "conflicts",
className: "crm-pair-conflict"
Copy link
Member

Choose a reason for hiding this comment

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

You can do this simply by adding this class to the header e.g. <td class="crm-pair-conflicts"> and it will be copied to each cell.

@deepak-srivastava
Copy link
Contributor Author

@colemanw thanks. rowCallback worked. className didn't. className remains in header (th), doesn't get copied for td. Any ideas?

@colemanw
Copy link
Member

Sorry, should be "cell-class". Here's an example:
https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Case/Form/ActivityTab.tpl#L77

On 08/12/2015 04:21 PM, Deepak Srivastava wrote:

@colemanw https://github.com/colemanw thanks. rowCallback worked.
className didn't. className remains in header (th), doesn't get copied
for td. Any ideas?


Reply to this email directly or view it on GitHub
#6432 (comment).

@deepak-srivastava
Copy link
Contributor Author

Seems done now. Let me know if you see anything else. Thanks.

@davecivicrm
Copy link
Contributor

Test failure appears to be unrelated. I get a failure on the same test method locally without this PR applied.

@eileenmcnaughton
Copy link
Contributor

Yeah - that test failure started with the last merge from 4.6

@eileenmcnaughton
Copy link
Contributor

Speaking of test failures ... doesn't look like there are any new tests in this PR... Pretty sure there is a starting point for testing merging via the api in the api_v3_ContactTest

davecivicrm added a commit that referenced this pull request Aug 27, 2015
CRM-16865: Mass Dedupe Workflow Improvements
@davecivicrm davecivicrm merged commit 7af8604 into civicrm:master Aug 27, 2015
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.

6 participants