The relation "Heartbeat Activity: Node Target ID" produces the same result (SQL query) of the relation "Heartbeat Activity: Node ID".

The problem is in heartbeat.views.inc, the 'field' value is copy-pasted:

'nid' => array(
'title' => t('Node ID'),
...
'relationship' => array(
'base' => 'node',
'field' => 'nid',
'label' => 'content',
'help' => t('Bring in data about the main node.'),
),
),
'nid_target' => array(
'title' => t('Node target ID'),
...
'relationship' => array( // this relationship brings in all fields the node table offers
'base' => 'node',
'field' => 'nid', // <---- SHOULD BE nid_target
'label' => 'content',
'help' => t('Bring in data about the node being addressed.'),
),
),

Same issue for uid and uid_target.

Comments

still an issue - does somebody care about this issue? Unfortunately I would really need this relationship "target node id" on the one hand - on the other hand I am not familiar with views api to deal with that on my own

tobiberlin; actually, solution is right there in what grimal says, if you go to heartbeat.views.inc and change "nid" by "nid_target" (line 152) it fixes the problem! I still need to learn how to make a patch, but for this case it should be really easy, as there is only 1 change.

Version:7.x-1.1» 7.x-1.x-dev
StatusFileSize
new719 bytes

Here is the patch!
PS: this is my first patch, so if there is something wrong with it, I would appreciate some feedback :)