Redmine: Issueshttps://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-06-15T07:20:41ZRedmine
Redmine Redmine - Defect #11170 (Closed): Topics sort order is broken in Redmine 2.xhttps://www.redmine.org/issues/111702012-06-15T07:20:41ZVitaly Klimov
<p>Because of Rails 3 by default uses order from <strong>has_many :order</strong> statement before any defined order, messages are always sorted by creation time first regardless of <strong>sticky</strong> attribute.</p>
<p>To fix it, line 46 in file <strong>app/controllers/boards_controller.rb</strong></p>
<pre><code class="Ruby syntaxhl"><span class="vi">@topics</span> <span class="o">=</span> <span class="vi">@board</span><span class="p">.</span><span class="nf">topics</span><span class="p">.</span><span class="nf">find</span> <span class="ss">:all</span><span class="p">,</span> <span class="ss">:order</span> <span class="o">=></span> <span class="p">[</span><span class="s2">"</span><span class="si">#{</span><span class="no">Message</span><span class="p">.</span><span class="nf">table_name</span><span class="si">}</span><span class="s2">.sticky DESC"</span><span class="p">,</span> <span class="n">sort_clause</span><span class="p">].</span><span class="nf">compact</span><span class="p">.</span><span class="nf">join</span><span class="p">(</span><span class="s1">', '</span><span class="p">),</span>
<span class="ss">:include</span> <span class="o">=></span> <span class="p">[</span><span class="ss">:author</span><span class="p">,</span> <span class="p">{</span><span class="ss">:last_reply</span> <span class="o">=></span> <span class="ss">:author</span><span class="p">}],</span>
<span class="ss">:limit</span> <span class="o">=></span> <span class="vi">@topic_pages</span><span class="p">.</span><span class="nf">items_per_page</span><span class="p">,</span>
<span class="ss">:offset</span> <span class="o">=></span> <span class="vi">@topic_pages</span><span class="p">.</span><span class="nf">current</span><span class="p">.</span><span class="nf">offset</span>
</code></pre>
<p>should be changed to</p>
<pre><code class="Ruby syntaxhl"><span class="vi">@topics</span> <span class="o">=</span> <span class="vi">@board</span><span class="p">.</span><span class="nf">topics</span><span class="p">.</span><span class="nf">reorder</span><span class="p">([</span><span class="s2">"</span><span class="si">#{</span><span class="no">Message</span><span class="p">.</span><span class="nf">table_name</span><span class="si">}</span><span class="s2">.sticky DESC"</span><span class="p">,</span> <span class="n">sort_clause</span><span class="p">].</span><span class="nf">compact</span><span class="p">.</span><span class="nf">join</span><span class="p">(</span><span class="s1">', '</span><span class="p">)).</span><span class="nf">all</span><span class="p">(</span>
<span class="ss">:include</span> <span class="o">=></span> <span class="p">[</span><span class="ss">:author</span><span class="p">,</span> <span class="p">{</span><span class="ss">:last_reply</span> <span class="o">=></span> <span class="ss">:author</span><span class="p">}],</span>
<span class="ss">:limit</span> <span class="o">=></span> <span class="vi">@topic_pages</span><span class="p">.</span><span class="nf">items_per_page</span><span class="p">,</span>
<span class="ss">:offset</span> <span class="o">=></span> <span class="vi">@topic_pages</span><span class="p">.</span><span class="nf">current</span><span class="p">.</span><span class="nf">offset</span><span class="p">)</span>
</code></pre> Redmine - Defect #11151 (Closed): Functions from helper modules for plugin not accessiblehttps://www.redmine.org/issues/111512012-06-13T15:46:30ZVitaly Klimov
<p>It seems that files under <strong>plugins/plugin_name/helpers</strong> ignored by Rails completely.</p>
<p>To check this, just create some SettingsHelper module in file names <strong>settings_helper.rb</strong> in some plugin folder:</p>
<pre>
module SettingsHelper
def get_text
"Plugin description"
end
end
</pre>
<p>Next, create file in <strong>app/views/settings/</strong> named <strong>_some_plugin_settings.html.erb</strong> with following content:</p>
<pre>
<fieldset class="box tabular">
<p>
<%= get_text %>
</p>
</fieldset>
</pre>
<p>Then add settings property to plugin <strong>init.rb</strong> file:</p>
<pre>
settings(:partial => 'settings/some_plugin_settings')
</pre>
<p>Now, when you try to configure plugin you will get <strong>undefined method (get_text)</strong> error.</p> Redmine - Defect #10348 (Closed): Wrong issue statuses assignment during issue copyhttps://www.redmine.org/issues/103482012-03-01T14:46:43ZVitaly Klimov
<p><strong>Defect:</strong> during issue copy available statuses computed based on source issue status. Also when creating issue status validation performed upon source issue status as well.</p>
<p>Steps to reproduce:</p>
<ol>
<li>Create two statuses - one should be default, other should be any other status, let's say their names are <strong>New</strong> and <strong>Done</strong></li>
<li>Create workflow that allows current user to change status from <strong>New</strong> to <strong>Done</strong> only and does not allow to change status from <strong>Done</strong> to any other</li>
<li>Create new issue</li>
<li>Change status to <strong>Done</strong></li>
<li>Copy issue - on the issue creation screen you will be able to choose <strong>New</strong> status</li>
<li>After issue creation status in the new issue will be reverted to <strong>Done</strong></li>
</ol>
<p>This defect also allows users to copy issues and assign them statuses they should not be able to assign.</p>
<p>Attached is the patch that solves this inconsistency</p> Redmine - Defect #10275 (Closed): Message object not passed to wiki macros for head topic and in ...https://www.redmine.org/issues/102752012-02-19T10:11:45ZVitaly Klimov
<p>nil passed instead of message object to wiki macros in <em>textilizable</em> function for head topic or for preview in edit mode. It is caused by inproper call to <em>textilizable</em> in <strong>messages\show.html.erb</strong>, line <strong>30</strong>:</p>
<pre><code class="ruby syntaxhl"><span class="o"><</span><span class="sx">%= textilizable(@topic.content, :attachments =</span><span class="o">></span> <span class="vi">@topic</span><span class="p">.</span><span class="nf">attachments</span><span class="p">)</span> <span class="o">%></span>
</code></pre>
<p>It should be corrected to</p>
<pre><code class="ruby syntaxhl"><span class="o"><</span><span class="sx">%= textilizable(@topic, :content, :attachments =</span><span class="o">></span> <span class="vi">@topic</span><span class="p">.</span><span class="nf">attachments</span><span class="p">)</span> <span class="o">%></span>
</code></pre>
<p>For edit mode preview:</p>
<p>in file <strong>messages\edit.html.erb</strong>, line <strong>15</strong> should be changed from</p>
<pre><code class="ruby syntaxhl"><span class="ss">:action</span> <span class="o">=></span> <span class="s1">'preview'</span><span class="p">,</span> <span class="ss">:board_id</span> <span class="o">=></span> <span class="vi">@board</span> <span class="p">},</span>
</code></pre>
<p>to</p>
<pre><code class="ruby syntaxhl"><span class="ss">:action</span> <span class="o">=></span> <span class="s1">'preview'</span><span class="p">,</span> <span class="ss">:board_id</span> <span class="o">=></span> <span class="vi">@board</span><span class="p">,</span> <span class="ss">:id</span> <span class="o">=></span> <span class="n">message</span> <span class="p">},</span>
</code></pre>
<p>for correct <em>message</em> variable calculation in <em>MessagesController.preview</em> method</p> Redmine - Feature #5922 (Closed): Ability to ignore current user in Query modelhttps://www.redmine.org/issues/59222010-07-21T06:04:17ZVitaly Klimov
<p>Right now Query model uses logged in user for checking permissions and creating statements thus making impossible to make queries inside plugin which will extract information from projects not visible to current user.</p>
<p>For example, if i want to display some information to user from projects that not seen by him, i am unable to use Query for building statement for my find request.</p> Redmine - Feature #3967 (Closed): Ability to define default columns to display based on projecthttps://www.redmine.org/issues/39672009-10-04T10:29:41ZVitaly Klimov
<p>It would be great if there would be possibility to define default columns to display for each project separately. Right now it is very unconvenient to have one setting for all projects. We have projects for different areas and thus default fields should be different for each area.</p>
<p>BTW, it is idea for plugin. I believe this one would be relatively easy to implement.</p> Redmine - Defect #3690 (Closed): Status change info duplicates on the issue screenhttps://www.redmine.org/issues/36902009-07-29T14:22:18ZVitaly Klimov
<p>After upgrade to <a class="changeset" title="Change subversion adapter to not cache authentication and run non interactively #3424" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2819">r2819</a> i got this strange behavior - all the status/priority changes are displayed twice on the issue screen. For example if i changed status from New to Resolved there would be two identical lines under Updated by: Status changed from New to Resolved. In the email notifications all is normal and reported only once.</p> Redmine - Defect #3689 (Closed): Report is empty if grouped by user in timesheethttps://www.redmine.org/issues/36892009-07-29T14:16:41ZVitaly Klimov
<p>While trying to display time report for all users grouped by user i received report only for current user, although all permissions were in place. Report looks correct if grouped by issue or by project with all user displayed. This bug does not occur for admin as well - report sorted by users displayed for admin account without any problems.</p> Redmine - Defect #3628 (Closed): Wrong local path to attached images in Wikihttps://www.redmine.org/issues/36282009-07-17T11:10:22ZVitaly Klimov
<p>Have recently upgraded to latest (2819) trunk revision of the Redmine. It seems that there are some error in Wiki pages rendering - inline images referenced as "/redmine/attachments/download/#ID#" instead of "/redmine/attachments/#ID#" although at the bottom of the page links are normal (without download part)</p>
<p>so instead of inline images i get <br /><pre>
!/redmine/attachments/download/1050!
</pre><br /> on the screen.</p>
<p>I am using Rails 2.2.2 and Ruby 1.8.6</p>