Actually, author_date and commiter_date fields in versioncontrol_operations table are not filled during "Fetch logs" operations on Git repository.
How to reproduce:
1) Add Git repository
2) Fetch logs for it
3) See versioncontrol_operations table
author_date and commiter_date fields are 0.
I guess problem line is 362 in versioncontrol_git.log
// build the data array to be used for the commit op
$op_data = array(
'type' => VERSIONCONTROL_OPERATION_COMMIT,
'revision' => $revision,
'author' => $author_email,
'author_name' => $author_name,
'committer' => $committer_email,
'committer_name' => $committer_name,
'parent_commit' => reset($parents),
'merge' => $merge,
'date' => $date,
'message' => $message,
'repository' => $repository,
);
and maybe it should be like
// build the data array to be used for the commit op
$op_data = array(
'type' => VERSIONCONTROL_OPERATION_COMMIT,
'revision' => $revision,
'author' => $author_email,
'author_name' => $author_name,
'committer' => $committer_email,
'committer_name' => $committer_name,
'parent_commit' => reset($parents),
'merge' => $merge,
'author_date' => $date,
'message' => $message,
'repository' => $repository,
);
Any suggestions about this?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 0001-Issue-1252096-by-marvil07-Lazy-Use-the-new-date-data.patch | 2.19 KB | marvil07 |
Comments
Comment #1
marvil07 commentedI can not believe I forget about this, actually there is another issue pointing the TODO about the related change on versioncontrol(#1054436: Store commit date and authoring date) for updating default views here(#1203264: Change default views to follow versioncontrol api change on views data).
So, this is critical, let's do it quickly.
Thanks for noticing it :-)
Comment #2
marvil07 commentedtitle typo
Comment #3
marvil07 commentedComment #4
marvil07 commentedHere the patch I pushed.
BTW I am bad with titles :-p
Comment #5
lazy commentedWow! Thank you for fast response and fix.