I get Points, Category, and Timestamp OK, but Description just shows up as blank.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Are you sure that there is a description?

Note that the "Reason" is often a automatically generated string based on the operation, not the Description.

holtzermann17’s picture

Category: bug » support

Oh, I thought that "Reason" was the "Description". My mistake! The question should then be "how to make the Reason" show up in the view? Thanks!

holtzermann17’s picture

Answering my follow-up question:

Install http://drupal.org/project/views_php and add a field to the view that's something like the following:

switch ($row->operation) {
 case 'userpoints_nc_comment_insert':
 return "Added comment to article " . db_query('SELECT nid FROM comment where cid = :cid', array(':cid' => $row->entity_id))->fetchField() . ".";
 break;
 
 case 'userpoints_nc_node_insert':
 return "Added node " . $row->entity_id . ".";
 break;
}
holtzermann17’s picture

Status: Active » Closed (works as designed)
a.ross’s picture

Category: Support request » Bug report
Issue summary: View changes
Status: Closed (works as designed) » Active

views_php is not a solution.

And this is a bug.

david_garcia’s picture

Closed https://drupal.org/node/1351684 as a duplicate.

david_garcia’s picture

Status: Active » Needs review
FileSize
3.05 KB

Here is a patch for that. We need a specific handler for the description. Performance is not as good as it could be, but it works.

david_garcia’s picture

The patch needs a full registry rebuild after being applied, description field must be readded due to new class handler.

Just run update.php.