https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-03-15T15:48:09ZRedmineRedmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=466932013-03-15T15:48:09ZAnonymous
<ul></ul><p>This patch also fixes issues <a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Map repository authors to Redmine users not used in statistics (Closed)" href="https://www.redmine.org/issues/7353">#7353</a> and <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Factorize user name in /repository/statistics (Closed)" href="https://www.redmine.org/issues/2761">#2761</a> (which are duplicates of other issues, but nobody flagged them as such, and I don't seem to be allowed to flag issues as duplicates).</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=466982013-03-15T16:40:32ZEtienne Massip
<ul><li><strong>Category</strong> set to <i>SCM</i></li></ul> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=467102013-03-16T13:29:26ZDaniel Felix
<ul></ul><p>Well I would like to test this issue. But currently I'm at the hospital. Just in case of the description, this sounds to be worth to look at it. :-)</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=467462013-03-17T10:59:17ZAnonymous
<ul></ul><p>No worries. Get back to good health and return home from hospital, redmine is no nearly as important as that!</p>
<p>I just hope this patch won't share the fate of those others and still be here, unresolved (i.e. neither accepted nor rejected) in four years <strong>g</strong>.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=467482013-03-17T11:41:35ZDaniel Felix
<ul></ul><p>Thanks!</p>
<p>Well I think this one will find a faster way. If there is the next minor release available this could be set to this release or at least the next major.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=487092013-04-17T20:18:52ZAnonymous
<ul></ul><p>Sadly after 1 month, it seems nobody had a chance to look at this. Too bad :-(. It would be nice to get at least some feedback on these things... as it is, development of Redmine seems to happen mostly behind closed doors and is not very welcome to outside contributions :-(.</p>
<p>Perhaps somebody <strong>did</strong> look at this patch and found an issue with that -- but without any feedback, that's impossible to tell for me :-(.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=487132013-04-18T00:42:53ZToshi MARUYAMA
<ul></ul><p>Because this patch does not have tests, I don't know it is correct or not.<br />I think it is better that Graph logic is moved from controller to helper in order to test.<br />See: <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/2.3.0/test/unit/lib/redmine/helpers/gantt_test.rb">source:tags/2.3.0/test/unit/lib/redmine/helpers/gantt_test.rb</a></p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=487272013-04-18T09:26:07ZAnonymous
<ul></ul><p>OK, that makes sense. I am not yet very familiar with the testing system (of Redmine, or any other Ruby / RoR app in general -- I am fairly new to Ruby). I will investigate the gantt_test you referred me to, thanks for the point. I will try and see if I can do something. Likewise, moving the logic from controller to helper is something I can do, if you prefer that.</p>
<p>However, currently I am swamped with other work, so it's easily possible that another month or two will pass before I get to address either point. If somebody else beats me to that with a better patch, I won't complain ;-) but in any case, the ball is now in my court, as I have some clear feedback. Thank you very much for that, and for your work on Redmine in general.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=549022014-02-19T10:26:18ZKeats .
<ul></ul><p>Hi, <br />it's working great. <br />Thanks</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=563362014-05-15T10:51:18Ztxemi M
<ul></ul><p>I would love to see this patch in next version,<br />thanks.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582702014-08-26T13:41:15ZJean-Baptiste Barth
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/14338">Defect #14338</a>: svn: repository statistics issue when user names only differ in case</i> added</li></ul> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582712014-08-26T13:44:15ZJean-Baptiste Barth
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Defect</i></li><li><strong>Assignee</strong> set to <i>Jean-Baptiste Barth</i></li><li><strong>Target version</strong> set to <i>2.6.0</i></li></ul><p>I started looking at it and adding some tests, I'll commit it soon, hopefully for an integration in 2.6.0 (it's a fix <br />but it has been here for a very long time, so it can wait past 2.5.3).</p>
<p><a class="user active" href="https://www.redmine.org/users/1364">Maxin Samuel</a>: thanks for the proposals but I started again from scratch because, as Toshi said, this code should'nt be here (some code belongs to the model imho, some other to helpers for SVG rendering). Moreover your patch has many effects in one and I'd like to keep things in separate commits so Toshi or Jean-Philippe can easily revert this if they judge it's not correct. Anyway it helped me see where the problem is so thanks for your contribution !</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582732014-08-26T13:45:21ZJean-Baptiste Barth
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" href="/issues/7353">Feature #7353</a>: Map repository authors to Redmine users not used in statistics</i>)</li></ul> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582762014-08-26T13:45:31ZJean-Baptiste Barth
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-3 priority-lowest closed" href="/issues/7353">Feature #7353</a>: Map repository authors to Redmine users not used in statistics</i> added</li></ul> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582822014-08-26T16:04:04ZToshi MARUYAMA
<ul></ul><p>Ruby 1.8.7 PostgreSQL test fails.<br /><a class="external" href="https://travis-ci.org/marutosi/redmine-bb/jobs/33601888">https://travis-ci.org/marutosi/redmine-bb/jobs/33601888</a></p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582832014-08-26T17:16:38ZJean-Baptiste Barth
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Ruby 1.8.7 PostgreSQL test fails.<br /><a class="external" href="https://travis-ci.org/marutosi/redmine-bb/jobs/33601888">https://travis-ci.org/marutosi/redmine-bb/jobs/33601888</a></p>
</blockquote>
<p>Thanks! That should be fixed in <a class="changeset" title="Fix text failing on some rubies/sql drivers because of improper length in Change#action (#13487)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13352">r13352</a>. There's no check on <code>Change#action</code> length as it's not user-controlled but it seems SQL drivers don't react the same way so we may be better adding some...</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582842014-08-26T17:36:52ZJean-Baptiste Barth
<ul></ul><p>I added committers/users mapping in <a class="changeset" title="Honnor committers/users mapping in repository statistics (#13487)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13353">r13353</a>, but I did not add the other features discussed by Max in the original issue (sort committer names, merge homonyms). In case tests pass, and if JPL and Toshi are OK with that, this feature could be released with Redmine 2.6.0.</p>
<p>Note that this can have a bit of performance impact because with this implementation multiple queries are run to find the correct user (it relies on <code>Repository#find_committer_user</code> while it could use <code>Changeset#user_id</code> directly). I'll improve that in the next few days.</p>
<p>Also it made me realize there are missing tests for <code>Repository#find_committer_user</code> and I think some edge cases are not handled correctly. I'll dig into that later.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=582882014-08-26T18:53:48ZToshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Ruby 1.8.7 PostgreSQL test fails.<br /><a class="external" href="https://travis-ci.org/marutosi/redmine-bb/jobs/33601888">https://travis-ci.org/marutosi/redmine-bb/jobs/33601888</a></p>
</blockquote>
<p>Because I restarted, log disappeared.<br />Ruby 1.9.3 PostgreSQL test fails due to same reason.<br /><a class="external" href="https://travis-ci.org/marutosi/redmine-bb/jobs/33601897">https://travis-ci.org/marutosi/redmine-bb/jobs/33601897</a><br /><pre>
1) Error:
test_stats_by_author_reflect_changesets_and_changes(RepositoryTest):
ActiveRecord::StatementInvalid: PG::StringDataRightTruncation: ERROR: value too long for type character varying(1)
: INSERT INTO "changes" ("action", "branch", "changeset_id", "from_path", "from_revision", "path", "revision") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"
</pre></p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=583232014-08-27T17:23:34ZJean-Baptiste Barth
<ul><li><strong>File</strong> <a href="/attachments/12304">0001-Optimize-committers-users-map-retrieval-for-statisti.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/12304/0001-Optimize-committers-users-map-retrieval-for-statisti.patch">0001-Optimize-committers-users-map-retrieval-for-statisti.patch</a> added</li></ul><p>Fwiw here's the patch to cut down the number of SQL queries by relying directly on <code>Changeset#user_id</code>. On my test repo (10k changesets, 40k file changes, 90 distinct committers), it cuts the number of SQL queries from 216 to 9.</p>
<p>But I don't commit it now because I'd like to have the feedback of the CI system which is down until the end of the week. I don't know if Oracle and SQLServer will support the custom select forms and I didn't see "AS" elsewhere in the codebase, so I want to be able to revert it quickly if it breaks.</p> Redmine - Defect #13487: Honor committer => user mapping in repository statisticshttps://www.redmine.org/issues/13487?journal_id=583682014-09-01T04:37:49ZJean-Baptiste Barth
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li><li><strong>Affected version</strong> set to <i>2.5.2</i></li></ul><p>All tests passing with r13361/r13362, so I close this issue. Other features deserve their own issue (but as said elsewhere I doubt they're a good idea in the general case for now ; maybe someday when we have something prettier client-side).</p>