Issue #1054436: Store commit date and authoring date renames the date field to author_date and introduces comitter_date.

However versioncontrol_project still relies on the old name causing errors like

User warning: Unknown column 'o.date' in 'field list' query: /* 93.223.254.51 node/1150302/edit/default-branch */ SELECT o.author_uid as uid, MIN(o.date) AS first_commit, MAX(o.date) AS last_commit, COUNT(o.vc_op_id) AS commits, u.name FROM versioncontrol_operations o INNER JOIN users u ON o.author_uid = u.uid WHERE o.repo_id = 22262 AND o.author_uid != 0 GROUP BY o.repo_id, o.author_uid ORDER BY last_commit DESC in _db_query() (line 150 of /var/www/dev/vcs-git-drupal.redesign.devdrupal.org/htdocs/includes/database.mysql.inc).

.

Comments

Niklas Fiekas’s picture

Status: Active » Needs review
StatusFileSize
new1.58 KB

The attached patch fixes the custom query that is using the field. I believe some views are using it too, but I don't know the Views API well enough to fix it (array key, if, field_name - what should be changed and more).

Niklas Fiekas’s picture

Niklas Fiekas’s picture

StatusFileSize
new14.24 KB

Looks like that regex is doing the right (= http://drupalcode.org/project/versioncontrol.git/commitdiff/8a69d0297) thing, so here is a reroll with perl -pi -e "s/'date'/'author_date'/g" $(find . -type f -name '*view.php').

Niklas Fiekas’s picture

StatusFileSize
new16.36 KB

Added tokens.

marvil07’s picture

Status: Needs review » Fixed

Patch commushed, thanks!

marvil07’s picture

Automatically closed -- issue fixed for 2 weeks with no activity.