Feature #11152
openLinking commit comment and time spent comment
0%
Description
Hi,
We are currently trying to use redmine for educational purpose at Polytechnique of Montréal Computer and Software engineering department.
Remine 1.4.2 is almost the perfect fit for our needs.
Redmine will be used by 20-40 team of 4-6 students for 4 months projects.
No need to tell that with students, if you want them to use something it got to be simple and powerfull( just like redmine !)
So each team will have to provide a weekly time sheet(no problem so far).
Using commit time tracking with git is very usefull. Except for one little thing, the comment associated with the time log is
Appliqué par commit test2|commit:c609cd1786d5d47d558efa5084113fadc98984f4
which is not very informative about what have been done,expecially for the instructors!
Sure the students could go on site and change the comment associated with the log but it's like doing the same job twice and you can't expect that much with students...
So
This is the syntax i'm currently using for commit:
refs #5 @0h30min test for function abcdef() added but need verification
So the output in the time entrie we would like to see is (see result.png)
and at the same time why can't we add comment to time report?
Is there anyway to achieve this ?
Thank you
Jonathan Rajotte
Files
Related issues
Updated by Jean-Philippe Lang over 12 years ago
- File magic_links.png magic_links.png added
- Subject changed from Linking commit comment and time spent comment (Git) to Linking commit comment and time spent comment
I'd prefer to enable "magic" Redmine links in time entry comments rather than appending the commit message to it. This way the commit:... would be turned into a clickable link to the commit (with the commit message visible in the link title):
What do you think?
Updated by Jonathan Rajotte over 12 years ago
Well, it's an improvment from what we got.
The thing is that we want to use the time entry as a weekly time sheet report. We want to know what have been done each time they commit time. This would be used as a tool for instructor for an easy follow-up. I hardly see an instructor go over maybe forty commit and time logging( for 10+ teams) with this solution.
Maybe one solution would be adding a comment syntax for commit. Something like this:
refs #3 @0h00min & insert comment to link here &
add if no comment is present just go with the "magic" link.
This could be a good solution i think.
I've seen patch for % ratio => #10767 but nothing for comment.
I know this represent some work but we are very greatfull for everything.
Updated by Mischa The Evil over 12 years ago
Jean-Philippe Lang wrote:
I'd prefer to enable "magic" Redmine links in time entry comments rather than appending the commit message to it. This way the commit:... would be turned into a clickable link to the commit (with the commit message visible in the link title):
What do you think?
I think this looks like a partial revival of issue #202 for about the "textilization" of the Timelog-entry comments. I'd say it would be an improvement to have these magic Redmine links enabled in the time-reports, especially now #4155 (superceding #1518 which also included %-done ratio support [like now aditionally requested in #10767]) is implemented within the core.
Though, I don't think this change will fulfill the request in this issue completely...
Updated by Jonathan Rajotte over 12 years ago
- File patch_time_log_comment.diff patch_time_log_comment.diff added
- File time_log.PNG time_log.PNG added
Well, I've put some time on this and finally come with a solution changing changeset.rb. With a little help from the solution provided in #10767.
I have modified TIMELOG_RE by swapping (m|min) to (min|m) because it was causing pattern recognition problem when using this syntax
refs #3 @10h10min
On it's orignal form using the regex would find this pattern despite the min keyword
refs #3 @10h10m
The rest is only regex manipulation and adding an argument to log_time function + a little verification for nil argument
The new syntax:
refs #3 @10h10min & Insert comment for time log entry here & normal comment here
The &***& field is only considered if @*** is present
Multiples refs is functional as normal
The output:
commit comment:
refs #3 @10h10min & Insert comment for time log entry here & normal comments here
output:
if no &**& is present the old comment form is used
what do you think ?
Updated by Etienne Massip over 12 years ago
I don't get it.
Why not simply textilize the content as Jean-Philippe suggested and replace the "Appliqué par xxxx" in the time log comment by the committed comment (if present)?
Updated by Jonathan Rajotte over 12 years ago
It would be very nice to get textilize content as well but the reason why I introduced a new syntax is simply for practical reason.
Ex. I wish to commit to my svn with this comment:
refs #4 @10h10min & function log_time,function log_comment_svn, refactoring the regexp & still having issue with pattern generation
On my time entry, I want what have been done, not some comment for the rest of the team or whatever (remember we use this as an educational tool...)
I think the distinction between Time comments and general comments is necessery.
I don't know if the main branch need this but I think it easier for anybody who needs to check hours spent to have betters descriptions of what have been done. Sure dev could commit then update manually time logs but I found this really "archaic".
Updated by Etienne Massip over 12 years ago
Jonathan Rajotte wrote:
I don't know if the main branch need this but I think it easier for anybody who needs to check hours spent to have betters descriptions of what have been done. Sure dev could commit then update manually time logs but I found this really "archaic".
I'm not sure about having general comments in vcs commits, this is not their place, only code related comments.
What you need is a plugin for your specific case IMHO, but I agree that "Applied with" comments might be replaced by commit comment in time tracking or they are hardly understandable.
Updated by Jonathan Rajotte over 12 years ago
Etienne Massip wrote:
I'm not sure about having general comments in vcs commits, this is not their place, only code related comments.
When I was talking about generals comments is was thinking code related comments with no relation to time logging.
Etienne Massip wrote:
[..] but I agree that "Applied with" comments might be replaced by commit comment in time tracking or they are hardly understandable.
This was the initial plan but I added syntax to separate time comments from general code comments. One or the other , as long as I can associate time and comment it's ok .
Updated by Ania K over 12 years ago
Why not simply textilize the content as Jean-Philippe suggested and replace the "Appliqué par xxxx" in the time log comment by the committed comment (if present)?
I agree. It would be great to have this option by default in redmine. Right now this comments (Appliqué par commit) are not useful at all.
Updated by Ania K over 12 years ago
- Assignee set to Jonathan Rajotte
what do you think ?
Jonathan Rajotte - as I don't know Ruby, could I ask you a favour?
Could you make similar patch to the one you made but with "general" comment entered to time log entry?
I guess it is pretty similar to the change you made and would be really helpful for me :)
Thanks in advance :)
Ania
Updated by Jonathan Rajotte over 12 years ago
- Assignee deleted (
Jonathan Rajotte)
I'm currently on a full-time project for the next 2 days. I'll do it as soon as possible. no problem
Updated by Ania K over 12 years ago
Jonathan Rajotte wrote:
I'm currently on a full-time project for the next 2 days. I'll do it as soon as possible. no problem
Thanks a lot :) It's not that urgent but would be great to have this comments working without double entering it in "& &" format.
We want to use this view as weekly time sheet report as well but we don't have two types of comments :)
Updated by Jonathan Rajotte over 12 years ago
The previous patch did not support issue linking, I forgot 2 parentheses.
Updated by Andreas Krummsdorf almost 9 years ago
Hi everone,
was is the current status of this request? So far it seems like Jonathan wrote a patch to cover his use case. Besides this, was is the official solution. I guess that i have the same problem with the comment in the time tracking entry.
I think it would be really useful if the commit message is used as comment in the time tracking entry. Because often there are reports generated for the time spend in a project and it would nice if the time tracking entries would include some meaningful comments. Because "Angewendet in Changeset commit:demo|19900296834faf5a5d434865cf04b55a733f04e7." is not very helpful. But it can also be additionally included if needed.
By the way, the last part of the actual comments seems like redmine syntax, but it is not formatted or linked. It is just plain text within the comment.
Greetings
Andreas
Updated by Toshi MARUYAMA almost 9 years ago
- Related to Feature #9804: Automatic activity of spent time logging from commit messages added
Updated by Markus Boremski about 6 years ago
Hey,
are there any news on this one here?
I also would be glad to have the possibility to "read" in the comments the commit-message.
I understand that there has been a discussion about the best way hot to do it.
Maybe for the start it would help to have the commit-message in the time-tracking-comment.
Would be glad to see something going on here.. :-)
Updated by Benedikt Breinbauer over 5 years ago
We would need this as well. Without showing the git commit message instead of the commit hash this feature is not very useful.