Redmine: Issueshttps://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292024-02-15T09:41:03ZRedmine
Redmine Redmine - Patch #40240 (Closed): Catalan translation update for 5.1-stablehttps://www.redmine.org/issues/402402024-02-15T09:41:03ZJoan J
<p>Added some missing translations, translation should be mostly complete now.<br />I attach both the path and the updated ca.yml</p>
<p>Regards</p> Redmine - Defect #40208 (Closed): An ActionController::RespondToMismatchError occurred in welcome...https://www.redmine.org/issues/402082024-02-07T12:21:45ZLiane Hampe
<a name="Problem"></a>
<h2 >Problem<a href="#Problem" class="wiki-anchor">¶</a></h2>
<p>Requesting the robots file via `https://<domain>.tld/robots` raises an error:</p>
<pre><code class="ruby syntaxhl"><span class="n">respond_to</span> <span class="n">was</span> <span class="n">called</span> <span class="n">multiple</span> <span class="n">times</span> <span class="n">and</span> <span class="n">matched</span> <span class="n">with</span> <span class="n">conflicting</span> <span class="n">formats</span> <span class="k">in</span> <span class="n">this</span> <span class="n">action</span><span class="o">.</span> <span class="no">Please</span> <span class="n">note</span> <span class="n">that</span> <span class="n">you</span> <span class="n">may</span> <span class="n">only</span> <span class="n">call</span> <span class="n">respond_to</span> <span class="n">and</span> <span class="n">match</span> <span class="n">on</span> <span class="n">a</span> <span class="n">single</span> <span class="nb">format</span> <span class="n">per</span> <span class="n">action</span><span class="p">.</span>
<span class="nf">app</span><span class="o">/</span><span class="n">controllers</span><span class="o">/</span><span class="n">application_controller</span><span class="p">.</span><span class="nf">rb</span><span class="p">:</span><span class="mi">592</span><span class="ss">:in</span> <span class="sb">`render_error'
</span></code></pre>
<p>Requesting the robots file via `https://<domain>.tld/robots.txt` works as expected.</p>
<p>This behavior is the same for all Redmine versions.</p>
<a name="Solution"></a>
<h2 >Solution<a href="#Solution" class="wiki-anchor">¶</a></h2>
<p>In order to make the request of the robots file more stable we could slightly change the route definition to <strong>allow both the request with and without format</strong> :</p>
<pre><code class="ruby syntaxhl"><span class="c1"># current definition</span>
<span class="n">get</span> <span class="s1">'robots'</span><span class="p">,</span> <span class="ss">:to</span> <span class="o">=></span> <span class="s1">'welcome#robots'</span>
<span class="c1"># modified definition</span>
<span class="n">get</span> <span class="s1">'robots'</span><span class="p">,</span> <span class="ss">:to</span> <span class="o">=></span> <span class="s1">'welcome#robots'</span><span class="p">,</span> <span class="ss">:defaults</span> <span class="o">=></span> <span class="p">{</span> <span class="ss">format: </span><span class="s1">'txt'</span> <span class="p">}</span>
</code></pre>
<p>The attached patch file implements this change and considers testing too.</p> Redmine - Defect #40193 (Closed): Performance issue with email address auto-linking in the defaul...https://www.redmine.org/issues/401932024-02-05T15:15:59ZVincent Robert
<p>We recently encountered a significant issue where a user created issues with very lengthy descriptions, including email addresses at the end. This scenario exposed a performance concern in the <code>auto_mailto!</code> method, leading to potential server overload and unavailable application.</p>
<p>The issue stems from the fact that the regular expression used in the <code>auto_mailto!</code> method is relatively slow when applied to large text, posing challenges for improvement.</p>
<p>Attached is a test case that replicates the problem, highlighting that text formatting is swift on extensive input without email addresses, but significantly slows down when the <code>auto_mailto!</code> method is involved.</p>
<p>To address this issue in our production environment, we've temporarily implemented a patch. While it may not be the most elegant piece of code, it effectively mitigates the problem we encountered. This solution prevents server timeouts when users attempt to render the affected issues:</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb
index 6bd4d4c3f..be084f43c 100644
</span><span class="gd">--- a/lib/redmine/wiki_formatting.rb
</span><span class="gi">+++ b/lib/redmine/wiki_formatting.rb
</span><span class="p">@@ -159,6 +159,7 @@</span> module Redmine
# Destructively replaces email addresses into clickable links
def auto_mailto!(text)
<span class="gi">+ return text if text.length > 10000
</span> text.gsub!(/([\w\.!#\$%\-+.\/]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/) do
mail = $1
if /<a\b[^>]*>(.*)(#{Regexp.escape(mail)})(.*)<\/a>/.match?(text)
</code></pre> Redmine - Defect #40182 (Closed): User Douglas Chang (shoudauw) created strange Wiki page (probab...https://www.redmine.org/issues/401822024-02-02T07:56:04ZAlex Che
<p><a href="https://www.redmine.org/users/690463" class="external">Douglas Chang</a> user was created and this user was immediately used to create strange page:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Just_a_test">https://www.redmine.org/projects/redmine/wiki/Just_a_test</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Defect #40180 (Closed): User Apurva Kunkulol (ak00753554@techmahindra.com) created a st...https://www.redmine.org/issues/401802024-02-01T10:27:21ZAlex Che
<p><a href="https://www.redmine.org/users/690184" class="external">Apurva Kunkulol</a> user was created and this user was immediately used to create strange page and strange issue:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/DISH_C3PO">https://www.redmine.org/projects/redmine/wiki/DISH_C3PO</a></li>
<li><a class="external" href="https://www.redmine.org/issues/40179">https://www.redmine.org/issues/40179</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Defect #40166 (Closed): Internationalize "Check all / Uncheck all" tooltip in project l...https://www.redmine.org/issues/401662024-01-31T14:18:50ZLiane Hampe
<p>Since Redmine 5.1 there is a new project list for admins using the same query interface as known on projects index page.</p>
<p>With this new project list there is a checkbox on the left for each project in the list.</p>
<p><img src="https://www.redmine.org/attachments/download/31908/clipboard-202401311510-5gnwp.png" title="Check all/Uncheck all not localized" alt="Check all/Uncheck all not localized" /></p>
<p>Hovering over the top checkbox displays a tooltipp with "Check all/Uncheck all". For an improved usability and consistency it would help to localize the tooltipp content.</p>
<p>This can be done in <code>app/views/projects/_list.html.erb</code>. Hier ist the relevant code snippet:</p>
<pre><code class="ruby syntaxhl"><span class="o"><</span><span class="n">table</span> <span class="k">class</span><span class="o">=</span><span class="s2">"list projects odd-even <%= @query.css_classes %>"</span><span class="o">></span>
<span class="o"><</span><span class="n">thead</span><span class="o">></span>
<span class="o"><</span><span class="n">tr</span><span class="o">></span>
<span class="o"><</span><span class="sx">% if </span><span class="vi">@admin_list</span> <span class="o">%></span>
<span class="o"><</span><span class="n">th</span> <span class="k">class</span><span class="o">=</span><span class="s2">"checkbox hide-when-print"</span><span class="o">></span>
<span class="o"><</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s2">"checkbox"</span> <span class="nb">name</span><span class="o">=</span><span class="s2">"check_all"</span> <span class="nb">id</span><span class="o">=</span><span class="s2">"check_all"</span> <span class="n">value</span><span class="o">=</span><span class="s2">""</span> <span class="k">class</span><span class="o">=</span><span class="s2">"toggle-selection"</span> <span class="n">title</span><span class="o">=</span><span class="s2">"Check all/Uncheck all"</span><span class="o">></span> <span class="o"><---</span> <span class="no">Not</span> <span class="n">localized</span> <span class="n">text</span> <span class="n">string!</span>
<span class="o"><</span><span class="sr">/th>
<% end %>
<% @query.inline_columns.each do |column| %>
<%= column_header(@query, column) %>
<% end %>
<% if @admin_list %>
<th></</span><span class="n">th</span><span class="o">></span>
<span class="o"><</span><span class="sx">% end </span><span class="o">%></span>
<span class="o"><</span><span class="sr">/tr>
</</span><span class="n">thead</span><span class="o">></span>
</code></pre> Redmine - Defect #40165 (Closed): User sailaja m has strange activity Forum/Wiki pageshttps://www.redmine.org/issues/401652024-01-31T14:18:37ZAlex Che
<p><a href="https://www.redmine.org/users/690056" class="external">sailaja m</a> user was created and this user was used to create strange page and has strange activity on forum:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Plugins%3E">https://www.redmine.org/projects/redmine/wiki/Plugins%3E</a></li>
<li><a class="external" href="https://www.redmine.org/boards/3/topics/69355?r=69359#message-69359">https://www.redmine.org/boards/3/topics/69355?r=69359#message-69359</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Patch #40148 (Closed): Update activerecord-sqlserver-adapter to 7.1https://www.redmine.org/issues/401482024-01-30T03:13:21ZYuichi HARADA
<p>Failed `bundle update`.</p>
<pre>
% bundle update
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Could not find compatible versions
Because rails >= 7.1.3 depends on activerecord = 7.1.3
and activerecord-sqlserver-adapter >= 6.1.0.0.rc1, < 7.0.0.0.rc1 depends on activerecord ~> 6.1.0,
rails >= 7.1.3 is incompatible with activerecord-sqlserver-adapter >= 6.1.0.0.rc1, < 7.0.0.0.rc1.
So, because Gemfile depends on rails = 7.1.3
and Gemfile depends on activerecord-sqlserver-adapter ~> 6.1.0,
version solving has failed.
%
</pre>
<p>The patch below resolves this issue.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/Gemfile b/Gemfile
index 1479fa42a9..01a530d4fb 100644
</span><span class="gd">--- a/Gemfile
</span><span class="gi">+++ b/Gemfile
</span><span class="p">@@ -75,7 +75,7 @@</span> if File.exist?(database_file)
gem 'sqlite3', '~> 1.7.0'
when /sqlserver/
gem 'tiny_tds', '~> 2.1.2'
<span class="gd">- gem 'activerecord-sqlserver-adapter', '~> 6.1.0'
</span><span class="gi">+ gem 'activerecord-sqlserver-adapter', '~> 7.1.2'
</span> else
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
end
</code></pre>
<p><a class="external" href="https://rubygems.org/gems/activerecord-sqlserver-adapter">https://rubygems.org/gems/activerecord-sqlserver-adapter</a></p> Redmine - Defect #40101 (Closed): User Sivakanth Kesiraju created strange empty Wiki pages (prob...https://www.redmine.org/issues/401012024-01-23T14:33:44ZAlex Che
<p><a href="https://www.redmine.org/users/689316" class="external">Sivakanth Kesiraju</a> user was created and this user was used to create strange pages:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Release_Notes">https://www.redmine.org/projects/redmine/wiki/Release_Notes</a></li>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Release_Notes1">https://www.redmine.org/projects/redmine/wiki/Release_Notes1</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Feature #40092 (Closed): Drop FastCGI supporthttps://www.redmine.org/issues/400922024-01-22T14:02:12ZGo MAEDA
<p>As you can see in the <a href="https://github.com/rack/rack/blob/3897649e8740e560a5fa142f972121a119b26b5c/CHANGELOG.md?plain=1#L141" class="external">changelog</a> of Rack, the FastCGI handler has been removed in Rack 3.0.0. This means that Redmine's code to support FastCGI, which relies on <code>Rack::Handler::FastCGI</code>, no longer works.</p>
<pre>
- Removed antiquated handlers: FCGI, LSWS, SCGI, Thin. ([#1658](https://github.com/rack/rack/pull/1658), [@ioquatix])
</pre>
<p>It is time to remove the code that no longer works and end support for FastCGI, as FastCGI is no longer a major option for deploying Ruby on Rails applications.</p> Redmine - Defect #40020 (Closed): ScmData.binary? incorrectly considers UTF-8 text as binaryhttps://www.redmine.org/issues/400202024-01-08T14:57:24ZGo MAEDA
<p>Currently, the <code>binary?</code> method in <code>Redmine::Scm::Adapters::ScmData</code> often misclassifies Unicode text as binary. This is because the method actually checks whether the given data is ASCII text or not.</p>
<p>The new implementation in the attached patch checks for control characters excluding tabs, newlines, and carriage returns, and calculates their proportion in the data. It ensures accurate detection of binary data while properly handling Unicode text.</p> Redmine - Defect #40015 (Closed): User 婉茹 黃 (ET_cookie) created strange Wiki page (probably SPAM)https://www.redmine.org/issues/400152024-01-08T07:42:45ZAlex Che
<p><a href="https://www.redmine.org/users/688519" class="external">婉茹 黃</a> user was created and this user was immediately used to create strange page:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Etpet">https://www.redmine.org/projects/redmine/wiki/Etpet</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Patch #40010 (Closed): Replace regular expression matches with String#start_with? / end...https://www.redmine.org/issues/400102024-01-07T04:36:00ZGo MAEDA
<p>The attached patch replaces regular expression matches with <code>String#start_with?</code> and <code>String#end_with?</code>.</p>
<p>The change improves the efficiency and readability of the code.</p>
<pre>
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
Warming up --------------------------------------
'#123'.start_with?('#')
2.218M i/100ms
/^#/.match?('#123') 1.322M i/100ms
Calculating -------------------------------------
'#123'.start_with?('#')
22.494M (± 1.0%) i/s - 113.141M in 5.030336s
/^#/.match?('#123') 13.208M (± 0.8%) i/s - 66.089M in 5.003943s
Comparison:
'#123'.start_with?('#'): 22494308.6 i/s
/^#/.match?('#123'): 13208263.3 i/s - 1.70x slower
</pre> Redmine - Patch #40008 (Closed): Replace String#sub with delete_prefix / delete_suffixhttps://www.redmine.org/issues/400082024-01-06T00:03:21ZGo MAEDA
<p>The attached patch replaces `String#sub` which is used to remove leading or trailing substring with <code>String#delete_prefix</code> and <code>String#delete_suffix</code> introduced in Ruby 2.5.</p>
<p>The change improves the efficiency and readability of the code.</p>
<pre>
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
Warming up --------------------------------------
'#123'.delete_prefix('#')
1.497M i/100ms
'#123'.sub('^#', '') 936.977k i/100ms
Calculating -------------------------------------
'#123'.delete_prefix('#')
14.822M (± 0.5%) i/s - 74.837M in 5.049042s
'#123'.sub('^#', '') 9.322M (± 1.2%) i/s - 46.849M in 5.026072s
Comparison:
'#123'.delete_prefix('#'): 14822395.1 i/s
'#123'.sub('^#', ''): 9322431.1 i/s - 1.59x slower
</pre> Redmine - Patch #40003 (Closed): Japanese translation update (r22550)https://www.redmine.org/issues/400032024-01-04T09:54:39ZGo MAEDA
<p>Translated <code>label_option_auto_lang</code>.</p> Redmine - Patch #40000 (Closed): Optimize gantt chart rendering for issues without subtaskshttps://www.redmine.org/issues/400002024-01-03T07:22:56ZGo MAEDA
<p>This patch introduces an optimization to the gantt chart rendering process. We can improve the performance by avoiding unnecessary database queries for issues that do not have subtasks, especially when rendering gantt with large numbers of issues.</p>
<p>The current implementation in the Gantt chart helper performs a database query to fetch children for every issue, regardless of whether the issue has subtasks.</p>
<pre>
Issue Load (0.4ms) SELECT "issues".* FROM "issues" WHERE "issues"."parent_id" = $1 ORDER BY "issues"."lft" ASC [["parent_id", 1]]
↳ lib/redmine/helpers/gantt.rb:768:in `html_subject'
Issue Load (0.3ms) SELECT "issues".* FROM "issues" WHERE "issues"."parent_id" = $1 ORDER BY "issues"."lft" ASC [["parent_id", 15]]
↳ lib/redmine/helpers/gantt.rb:768:in `html_subject'
Issue Load (0.4ms) SELECT "issues".* FROM "issues" WHERE "issues"."parent_id" = $1 ORDER BY "issues"."lft" ASC [["parent_id", 16]]
↳ lib/redmine/helpers/gantt.rb:768:in `html_subject'
Issue Load (0.2ms) SELECT "issues".* FROM "issues" WHERE "issues"."parent_id" = $1 ORDER BY "issues"."lft" ASC [["parent_id", 17]]
↳ lib/redmine/helpers/gantt.rb:768:in `html_subject'
Issue Load (0.1ms) SELECT "issues".* FROM "issues" WHERE "issues"."parent_id" = $1 ORDER BY "issues"."lft" ASC [["parent_id", 18]]
</pre>
<p>With the patch applied, it first checks if the issue has children by using <code>object.leaf?</code>. If the issue has no children, it avoids the database query to retrieve children. This check can reduce a considerable number of SQL queries.</p>
<p>Below is the test result with 500 issues. All issues don't have subtasks.</p>
<p><strong>Without the patch:</strong><br /><pre>
$ hey -n 50 -c 1 http://localhost:3000/projects/ecookbook/issues/gantt
Summary:
Total: 19.2706 secs
Slowest: 0.5254 secs
Fastest: 0.3520 secs
Average: 0.3854 secs
Requests/sec: 2.5946
Total data: 61809550 bytes
Size/request: 1236191 bytes
</pre></p>
<p><strong>With the patch applied:</strong><br /><pre>
$ hey -n 50 -c 1 http://localhost:3000/projects/ecookbook/issues/gantt
Summary:
Total: 13.4183 secs
Slowest: 0.2972 secs
Fastest: 0.2455 secs
Average: 0.2684 secs
Requests/sec: 3.7263
Total data: 61809550 bytes
Size/request: 1236191 bytes
</pre></p> Redmine - Patch #39993 (Closed): Optimize loading of journals, relations, and allowed_statuses in...https://www.redmine.org/issues/399932023-12-31T02:48:23ZGo MAEDA
<p>The attached patch introduces an optimization in the IssuesController to conditionally load <code>@journals</code>, <code>@relations</code>, and <code>@allowed_statuses</code> based on the context of the request (API vs. web).</p>
<p><code>@journals</code>, <code>@relations</code>, and <code>@allowed_statuses</code> are now loaded only if the request is not an API request or if they are explicitly included in the API response. This change prevents unnecessary data loading, thereby reducing server load and improving response times for API requests.</p> Redmine - Defect #39991 (Closed): Fix "any" operator for text filters to exclude empty text valueshttps://www.redmine.org/issues/399912023-12-30T15:52:06ZYasu Saku
<p>For example, filtering issues with any notes filter will include issues with blank notes.<br />Is this a specification?<br />I don't think the SQL <code>journals.notes IS NOT NULL</code> is appropriate. A journal without notes has an empty string, not NULL.</p>
<a name="Steps-to-reproduce"></a>
<h3 >Steps to reproduce:<a href="#Steps-to-reproduce" class="wiki-anchor">¶</a></h3>
<ol>
<li>Load fixtures with <code>rake db:fixtures:load</code>.</li>
<li>Update some parameters of an issue without any notes, like issue #3 in fixtures.</li>
<li>Filter issues with any string in the notes.</li>
<li>The issue #3 is extracted, but it does not have notes containing a string.</li>
</ol>
<p><img src="https://www.redmine.org/attachments/download/31731/clipboard-202312302147-586r1.png" alt="" /></p>
<h4>Journal table in this example<br /><pre>
mysql> select id,journalized_id,created_on,notes from journals;
+----+----------------+---------------------+--------------------------------------------------------------------------+
| id | journalized_id | created_on | notes |
+----+----------------+---------------------+--------------------------------------------------------------------------+
| 1 | 1 | 2023-12-28 00:00:00 | Journal notes |
| 2 | 1 | 2023-12-29 00:00:00 | Some notes with Redmine links: #2, r2. |
| 3 | 2 | 2023-12-29 00:00:00 | A comment with inline image: !picture.jpg! and a reference to #1 and r2. |
| 4 | 6 | 2023-12-29 00:00:00 | A comment with a private version. |
| 5 | 14 | 2023-12-29 00:00:00 | A comment on a private issue. |
| 10 | 3 | 2023-12-30 11:59:40 | |
+----+----------------+---------------------+--------------------------------------------------------------------------+
6 rows in set (0.01 sec)
</pre></h4>
<h4>Actual SQL generated by <code>IssueQuery::sql_for_notes_field</code><br /><pre><code class="sql syntaxhl"><span class="k">EXISTS</span> <span class="p">(</span><span class="k">SELECT</span> <span class="mi">1</span> <span class="k">FROM</span> <span class="n">journals</span> <span class="k">WHERE</span> <span class="n">journals</span><span class="p">.</span><span class="n">journalized_type</span><span class="o">=</span><span class="s1">'Issue'</span> <span class="k">AND</span> <span class="n">journals</span><span class="p">.</span><span class="n">journalized_id</span><span class="o">=</span><span class="n">issues</span><span class="p">.</span><span class="n">id</span> <span class="k">AND</span> <span class="p">(</span><span class="n">journals</span><span class="p">.</span><span class="n">notes</span> <span class="k">IS</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">)</span> <span class="k">AND</span> <span class="p">((</span><span class="n">journals</span><span class="p">.</span><span class="n">private_notes</span> <span class="o">=</span> <span class="k">FALSE</span> <span class="k">OR</span> <span class="n">journals</span><span class="p">.</span><span class="n">user_id</span> <span class="o">=</span> <span class="mi">1</span> <span class="k">OR</span> <span class="p">(</span><span class="n">projects</span><span class="p">.</span><span class="n">status</span> <span class="o"><></span> <span class="mi">9</span> <span class="k">AND</span> <span class="n">projects</span><span class="p">.</span><span class="n">status</span> <span class="o"><></span> <span class="mi">10</span><span class="p">))))</span>
</code></pre></h4>
<a name="Environment"></a>
<h3 >Environment:<a href="#Environment" class="wiki-anchor">¶</a></h3>
<pre>
Redmine version 5.1.1.stable
Ruby version 3.2.2-p53 (2023-03-30) [x86_64-linux]
Rails version 6.1.7.6
Environment development / productioin
Database adapter Mysql2 / PostgreSQL
</pre> Redmine - Patch #39985 (Closed): Update SQLite3 gem to 1.7https://www.redmine.org/issues/399852023-12-30T04:07:01ZGo MAEDA
<p><a class="external" href="https://rubygems.org/gems/sqlite3">https://rubygems.org/gems/sqlite3</a></p> Redmine - Patch #39972 (Closed): Update Nokogiri to 1.16.0https://www.redmine.org/issues/399722023-12-29T08:03:02ZGo MAEDA
<p><a class="external" href="https://rubygems.org/gems/nokogiri">https://rubygems.org/gems/nokogiri</a></p> Redmine - Patch #39971 (Closed): Remove specific platform constraints for database adapter gemshttps://www.redmine.org/issues/399712023-12-29T05:21:53ZGo MAEDA
<p>This patch simplifies the Gemfile by removing the <code>:platforms</code> constraints from the database adapter gems.</p>
<p>Since Redmine used to support JRuby, the Gemfile included platform-specific dependencies to use different database adapters for JRuby and MRI Ruby. However, the database adapter gems for JRuby were removed from the Gemfile in <a class="changeset" title="Gemfile: remove jruby definitions" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/16517">r16517</a>, making these platform-specific conditions no longer necessary.</p> Redmine - Defect #39956 (Closed): User Apk eon (Apkeon) created strange Wiki page (probably SPAM)https://www.redmine.org/issues/399562023-12-27T18:26:26ZAlex Che
<p><a href="https://www.redmine.org/users/688058" class="external">Apk eon</a> user was created and this user was immediately used to create strange page:</p>
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/Minecraft_Mod_Apk">https://www.redmine.org/projects/redmine/wiki/Minecraft_Mod_Apk</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Patch #39941 (Closed): Traditional Chinese translation update (to 22556)https://www.redmine.org/issues/399412023-12-26T03:21:46ZChunChang (Nagaharu) Lo
<ul>
<li>new
<ul>
<li>label_user_mail_option_bookmarked, label_option_auto_lang</li>
</ul></li>
</ul> Redmine - Defect #39932 (Closed): Incorrect position of "Edited" mark in issue notes with h4 head...https://www.redmine.org/issues/399322023-12-24T10:17:12ZYasu Saku
<p>"Edited tag" position is incorrect after issue note update, but it is correct after the page is reloaded.</p>
<a name="Steps-to-reproduce"></a>
<h4 >Steps to reproduce:<a href="#Steps-to-reproduce" class="wiki-anchor">¶</a></h4>
<ol>
<li>Edit the existing note using the Edit Note button in the issue history.</li>
<li>Update note containing H4 tags.</li>
</ol>
<p><img src="https://www.redmine.org/attachments/download/31689/journal_edit.png" alt="" /></p>
<a name="My-Environment"></a>
<h4 >My Environment:<a href="#My-Environment" class="wiki-anchor">¶</a></h4>
<pre>
Redmine version 5.1.1.stable
Ruby version 3.2.2-p53 (2023-03-30) [x86_64-linux]
Rails version 6.1.7.6
</pre>
<a name="Proposal"></a>
<h4 >Proposal:<a href="#Proposal" class="wiki-anchor">¶</a></h4>
<p>To resolve this issue, I believe it might be sufficient to make corrections to the following sections.<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/views/journals/update.js.erb b/app/views/journals/update.js.erb
index 87320c5d4a..0b9f99a31a 100644
</span><span class="gd">--- a/app/views/journals/update.js.erb
</span><span class="gi">+++ b/app/views/journals/update.js.erb
</span><span class="p">@@ -7,7 +7,7 @@</span>
$("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
$("#journal-<%= @journal.id %>-notes").show();
$("#journal-<%= @journal.id %>-form").remove();
<span class="gd">- var journal_header = $("#change-<%= @journal.id %> h4");
</span><span class="gi">+ var journal_header = $("#change-<%= @journal.id %>>div.note>h4.note-header");
</span> var journal_updated_info = journal_header.find("span.update-info");
if (journal_updated_info.length > 0) {
journal_updated_info.replaceWith('<%= escape_javascript(render_journal_update_info(@journal)) %>');
</code></pre><br /><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/5.1.1/app/views/journals/update.js.erb#L10">source:/tags/5.1.1/app/views/journals/update.js.erb#L10</a></p> Redmine - Patch #39889 (Closed): Update RuboCop Rails to 2.24https://www.redmine.org/issues/398892023-12-20T09:40:10ZGo MAEDA
<p><a class="external" href="https://rubygems.org/gems/rubocop-rails">https://rubygems.org/gems/rubocop-rails</a></p> Redmine - Patch #39888 (Closed): Update RuboCop Performance to 1.20https://www.redmine.org/issues/398882023-12-20T09:01:04ZGo MAEDA
<p><a class="external" href="https://rubygems.org/gems/rubocop-performance">https://rubygems.org/gems/rubocop-performance</a></p> Redmine - Patch #39887 (Closed): Update RuboCop to 1.59https://www.redmine.org/issues/398872023-12-20T07:02:47ZGo MAEDA
<p><a class="external" href="https://rubygems.org/gems/rubocop">https://rubygems.org/gems/rubocop</a></p> Redmine - Defect #39874 (Closed): SPAM entry in the wikihttps://www.redmine.org/issues/398742023-12-19T11:20:00ZC S
<p>SPAM entry in the wiki: <a class="wiki-page new" href="https://www.redmine.org/projects/redmine/wiki/Atlanta_Car_Accident_Lawyer">Atlanta_Car_Accident_Lawyer</a></p> Redmine - Patch #39865 (Closed): extend mysql8? test helper to handle complex version stringshttps://www.redmine.org/issues/398652023-12-18T06:19:37ZJens Krämerjk@jkraemer.net
<p>In my MariaDB 11 docker image, <code>Redmine::Database.mysql_version</code> is <code>11.1.2-MariaDB-1:11.1.2+maria~ubu2204</code>, which leads to an error in <code>Gem::Version.new</code>. The attached patch attempts to clean up the version string into the expected major.minor.patch format.</p> Redmine - Patch #39857 (Closed): Optimize users visibility checkhttps://www.redmine.org/issues/398572023-12-15T14:40:14ZPavel Rosický
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/principal.rb b/app/models/principal.rb
index 4cce97e26..25a79d768 100644
</span><span class="gd">--- a/app/models/principal.rb
</span><span class="gi">+++ b/app/models/principal.rb
</span><span class="p">@@ -48,8 +48,8 @@</span> class Principal < ActiveRecord::Base
all
else
view_all_active = false
<span class="gd">- if user.memberships.to_a.any?
- view_all_active = user.memberships.any? {|m| m.roles.any? {|r| r.users_visibility == 'all'}}
</span><span class="gi">+ if user.memberships.any?
+ view_all_active = User.where(id: user.id).joins(memberships: :roles).where("#{Role.table_name}.users_visibility = ?", 'all').any?
</span> else
view_all_active = user.builtin_role.users_visibility == 'all'
end
</code></pre>
<p>in a bad scenario user.memberships.any? {|m| m.roles... is (n * memberships without permissions + 1 queries) which is very slow. Let the database do the job.<br />unfortunately in an ideal scenario (where the very first membership has the users_visibility == 'all') performance could be slightly worse, but I think it's an acceptable tradeoff</p> Redmine - Patch #39852 (Closed): Optimize queries visibility checkhttps://www.redmine.org/issues/398522023-12-14T21:44:33ZPavel Rosický
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/query.rb b/app/models/query.rb
index 5630f95c7..fa23dc29f 100644
</span><span class="gd">--- a/app/models/query.rb
</span><span class="gi">+++ b/app/models/query.rb
</span><span class="p">@@ -378,16 +378,15 @@</span> class Query < ActiveRecord::Base
if user.admin?
scope.where("#{table_name}.visibility <> ? OR #{table_name}.user_id = ?", VISIBILITY_PRIVATE, user.id)
elsif user.memberships.any?
<span class="gd">- scope.where(
- "#{table_name}.visibility = ?" +
- " OR (#{table_name}.visibility = ? AND #{table_name}.id IN (" +
- "SELECT DISTINCT q.id FROM #{table_name} q" +
- " INNER JOIN #{table_name_prefix}queries_roles#{table_name_suffix} qr on qr.query_id = q.id" +
- " INNER JOIN #{MemberRole.table_name} mr ON mr.role_id = qr.role_id" +
- " INNER JOIN #{Member.table_name} m ON m.id = mr.member_id AND m.user_id = ?" +
- " INNER JOIN #{Project.table_name} p ON p.id = m.project_id AND p.status <> ?" +
- " WHERE q.project_id IS NULL OR q.project_id = m.project_id))" +
- " OR #{table_name}.user_id = ?",
</span><span class="gi">+ scope.where("#{table_name}.visibility = ?" \
+ " OR (#{table_name}.visibility = ? AND EXISTS (SELECT 1" \
+ " FROM #{table_name_prefix}queries_roles#{table_name_suffix} qr" \
+ " INNER JOIN #{MemberRole.table_name} mr ON mr.role_id = qr.role_id" \
+ " INNER JOIN #{Member.table_name} m ON m.id = mr.member_id AND m.user_id = ?" \
+ " INNER JOIN #{Project.table_name} p ON p.id = m.project_id AND p.status <> ?" \
+ " WHERE qr.query_id = #{table_name}.id" \
+ " AND (#{table_name}.project_id IS NULL OR #{table_name}.project_id = m.project_id)))" \
+ " OR #{table_name}.user_id = ?",
</span> VISIBILITY_PUBLIC, VISIBILITY_ROLES, user.id, Project::STATUS_ARCHIVED, user.id)
elsif user.logged?
scope.where("#{table_name}.visibility = ? OR #{table_name}.user_id = ?", VISIBILITY_PUBLIC, user.id)
</code></pre> Redmine - Patch #39849 (Closed): Optimize IssueCategory SQL queries when showing an issuehttps://www.redmine.org/issues/398492023-12-14T13:44:29ZGo MAEDA
<p>The attached patch introduces a change in the <code>_attributes.html.erb</code> partial for issues, aimed at optimizing SQL queries related to issue categories. This change reduces an SQL query that checks the existence of issue category records.</p>
<p>Before:<br /><pre>
IssueCategory Exists? (0.4ms) SELECT 1 AS one FROM "issue_categories" WHERE "issue_categories"."project_id" = $1 LIMIT $2 [["project_id", 1], ["LIMIT", 1]]
↳ app/views/issues/_attributes.html.erb:36
IssueCategory Load (0.2ms) SELECT "issue_categories".* FROM "issue_categories" WHERE "issue_categories"."project_id" = $1 ORDER BY "issue_categories"."name" ASC [["project_id", 1]]
↳ app/views/issues/_attributes.html.erb:37:in `collect'
</pre></p>
<p>After:<br /><pre>
IssueCategory Pluck (0.2ms) SELECT "issue_categories"."name", "issue_categories"."id" FROM "issue_categories" WHERE "issue_categories"."project_id" = $1 ORDER BY "issue_categories"."name" ASC [["project_id", 1]]
↳ app/views/issues/_attributes.html.erb:35
</pre></p> Redmine - Patch #39847 (Closed): Cache the result of `Journal#attachments`https://www.redmine.org/issues/398472023-12-14T11:10:06ZGo MAEDA
<p>When rendering an issue history, <code>Journal#attachments</code> is called twice while rendering a single journal.</p>
<p>We can improve efficiency by caching the result of the method. With caching, unnecessary iterations over details and calls to Attachment.where can be reduced.</p>
<p>Before:<br /><pre>
Attachment Load (0.4ms) SELECT "attachments".* FROM "attachments" WHERE "attachments"."id" IN ($1, $2) [["id", 39], ["id", 38]]
↳ app/models/journal.rb:146:in `sort_by'
CACHE Attachment Load (0.0ms) SELECT "attachments".* FROM "attachments" WHERE "attachments"."id" IN ($1, $2) [["id", 39], ["id",
38]]
↳ app/models/journal.rb:146:in `sort_by'
</pre></p>
<p>After:<br /><pre>
Attachment Load (0.4ms) SELECT "attachments".* FROM "attachments" WHERE "attachments"."id" IN ($1, $2) [["id", 39], ["id", 38]]
↳ app/models/journal.rb:147:in `sort_by'
</pre></p> Redmine - Patch #39840 (Closed): Optimize `Issue#relations` method to fetch both `relations_from`...https://www.redmine.org/issues/398402023-12-13T13:17:36ZGo MAEDA
<p>This patch updates `Issue#relations` method to efficiently fetch both `relations_from` and `relations_to` using a single ActiveRecord query. This optimization reduces database calls and improves performance.</p>
<p>Before:<br /><pre>
IssueRelation Load (0.2ms) SELECT "issue_relations".* FROM "issue_relations" WHERE "issue_relations"."issue_from_id" = $1 [["issue_from_id", 1]]
↳ app/models/issue.rb:1169:in `relations'
IssueRelation Load (0.5ms) SELECT "issue_relations".* FROM "issue_relations" WHERE "issue_relations"."issue_to_id" = $1 [["issue_to_id", 1]]
↳ app/models/issue.rb:1169:in `relations'
</pre></p>
<p>After:<br /><pre>
IssueRelation Load (0.7ms) SELECT "issue_relations".* FROM "issue_relations" WHERE (issue_to_id = 1 OR issue_from_id = 1)
↳ app/models/issue.rb:1171:in `sort'
</pre></p> Redmine - Patch #39837 (Closed): Optimize query models by replacing `map` with `pluck`https://www.redmine.org/issues/398372023-12-13T05:58:03ZGo MAEDA
<p>The attached patch introduces several changes aimed at optimizing various queries in query models.</p>
<p>It replaces `map` with `pluck` in several places, and improves the efficiency of data retrieval from the database. This change should lead to better performance and reduce memory usage.</p> Redmine - Patch #39835 (Closed): Optimize repository menu visibility checkhttps://www.redmine.org/issues/398352023-12-12T14:19:08ZGo MAEDA
<p>This patch introduces an optimization in the way Redmine determines the visibility of the "Repository" menu item.</p>
<p>While the current code loads the entire collection of repositories associated with the project, the new code only checks if there are any records in the repositories table associated with the project's ID. This can be faster if the project has a lot of repositories.</p>
<p>SQL of the current code:<br /><pre>
Repository Load (0.0ms) SELECT "repositories".* FROM "repositories" WHERE "repositories"."project_id" = ? [["project_id", 1]]
</pre></p>
<p>SQL of the new code:<br /><pre>
Repository Exists? (0.0ms) SELECT 1 AS one FROM "repositories" WHERE "repositories"."project_id" = ? LIMIT ? [["project_id", 1], ["LIMIT", 1]]
</pre></p> Redmine - Feature #39805 (Closed): Extend "contains" operator in "Parent task" filter to support ...https://www.redmine.org/issues/398052023-12-11T01:56:41ZGo MAEDA
<p>Under the "Parent task" filter, the "is" operator allows users to filter tasks by specifying multiple issue IDs (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Multiple issue ids in "Parent task" filter (Closed)" href="https://www.redmine.org/issues/30482">#30482</a>). I propose extending the "contains" operator to multiple issue IDs, like the "is" operator.</p>
<p>With this feature, you will be able to list all descendants issues of the specified issues. Currently, you can only list child issues of multiple issues with the "is" operator but there is no way to list all descendants of multiple issues because the "is" operator only accepts single issue ID.</p> Redmine - Defect #39802 (Closed): Fix click event handling in mobile view after closing flyout menuhttps://www.redmine.org/issues/398022023-12-09T13:14:36Zsalman mp
<p>In the mobile view, after opening flyout menu, there is a javascript that prevents click event on <code>#main</code> element. After closing menu it must reset to normal bahaviour, but despite mentioned in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Status: Closed" href="https://www.redmine.org/issues/30448#note-13">Patch #30448#note-13: Remove wrapper2 and wrapper3 wrapping containers</a> this is not patched yet.</p>
<pre><code class="diff syntaxhl"><span class="gh">Index: public/javascripts/responsive.js
</span><span class="gd"><+>UTF-8
</span><span class="gh">===================================================================
diff --git a/public/javascripts/responsive.js b/public/javascripts/responsive.js
</span><span class="gd">--- a/public/javascripts/responsive.js (revision 41895:183d6d070b7e204d024b7f30fd0dac75ff60ef70)
</span><span class="gi">+++ b/public/javascripts/responsive.js (revision 41895+:183d6d070b7e+)
</span><span class="p">@@ -11,7 +11,7 @@</span>
function closeFlyout() {
$('html').removeClass('flyout-is-active');
<span class="gd">- $('#wrapper').off('click');
</span><span class="gi">+ $('#main').off('click');
</span> }
</code></pre> Redmine - Defect #39801 (Closed): Fix typo in Russian translation of text_status_no_workflowhttps://www.redmine.org/issues/398012023-12-09T02:34:26ZEvangeline RomeRedmine - Defect #39795 (Closed): Fix improper error highlighting for description field in issue ...https://www.redmine.org/issues/397952023-12-08T05:36:51ZMizuki ISHIKAWA
<p>There is a feature that highlights input fields with a red border when a validation error occurs. An issue was identified with the 'Description' field, set as a mandatory input. When a validation error is triggered in this field, the red border is incorrectly positioned.<br /><img src="https://www.redmine.org/attachments/download/31590/clipboard-202312081436-va2fa.png" style="width: 500px;border: 1px solid #ccc;" alt="" /></p>
<p>This problem does not occur with 'Long text' format custom fields. The notable difference is that the 'Description' field contains a 'span#issue_description_and_toolbar' element, which causes the red border to be displayed around the span tag, unlike in custom fields.</p> Redmine - Patch #39782 (Closed): Russian translation update for 5.1-stablehttps://www.redmine.org/issues/397822023-12-06T07:00:37ZGrigory TumakovRedmine - Patch #39781 (Closed): Persian translation update for 5.1-stablehttps://www.redmine.org/issues/397812023-12-05T14:56:21Zsalman mp
<p>Translates some new entry and fix some invalid items.</p> Redmine - Defect #39780 (Closed): User select element on activity sidebar views cutoff when displ...https://www.redmine.org/issues/397802023-12-05T09:12:19ZMischa The Evil
<p>When the user zooms the viewport to >150%, the user select element on activity sidebar views (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add an interface to filter activities by user (Closed)" href="https://www.redmine.org/issues/33602">#33602</a>) is cutoff:</p>
<p><img src="https://www.redmine.org/attachments/download/31569/2023-12-05_09-42-00.png" alt="" /></p> Redmine - Patch #39777 (Closed): Remove useless method #run_in_request? from db/migrate/202212141...https://www.redmine.org/issues/397772023-12-04T18:34:18ZPavel Rosický
<p>the method doesn't seem to be relevant ( introduced by <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Introduce permission to set a project public (Closed)" href="https://www.redmine.org/issues/38048">#38048</a> )</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/db/migrate/20221214173537_add_select_project_publicity_permission.rb b/db/migrate/20221214173537_add_select_project_publicity_permission.rb
index aed1b07d1..7a0fee7c8 100644
</span><span class="gd">--- a/db/migrate/20221214173537_add_select_project_publicity_permission.rb
</span><span class="gi">+++ b/db/migrate/20221214173537_add_select_project_publicity_permission.rb
</span><span class="p">@@ -10,6 +10,4 @@</span> class AddSelectProjectPublicityPermission < ActiveRecord::Migration[6.1]
r.remove_permission!(:select_project_publicity)
end
end
<span class="gd">-
- def run_in_request?; true end
</span> end
</code></pre> Redmine - Feature #39761 (Closed): Ruby 3.3 supporthttps://www.redmine.org/issues/397612023-12-01T08:37:39ZGo MAEDA
<p>Ruby 3.3.0 is going to be released on December 25th, 2023.</p> Redmine - Defect #39755 (Closed): CommonMark Markdown help page does not reflect user's language ...https://www.redmine.org/issues/397552023-11-30T13:18:21ZGo MAEDA
<p>The CommonMark Markdown help should open the translated version if one exists, but in fact it always opens the English version.</p>
<p>Step to reproduce:</p>
<p>1. Change the text formatting to CommonMark markdown in Administration > Settings > General<br />2. Change the language to German in the "My account" <br />3. Open the issue creation page and click "[?]" in the toolbar</p>
<p>Expected Behavior:</p>
<p>The help should open in the selected interface language, which in this case is German.</p>
<p>Actual Behavior:</p>
<p>Despite the language setting being German and the file public/help/de/wiki_syntax_common_mark.html exists, the help page opens in English.</p> Redmine - Defect #39588 (Closed): User Ridamaouchep created a strange empty Wiki page (probably ...https://www.redmine.org/issues/395882023-11-21T07:15:47ZAlex Che
<a href="https://www.redmine.org/users/685971" class="external">Rida Maouche</a> user was created and this user was used immediately to create an empty page:
<ul>
<li><a class="external" href="https://www.redmine.org/projects/redmine/wiki/2318246">https://www.redmine.org/projects/redmine/wiki/2318246</a></li>
</ul>
<p>Whole list of this user's activity could be found on his profile page.</p> Redmine - Defect #39576 (Closed): `rake yard` does not work with Ruby >= 3.2https://www.redmine.org/issues/395762023-11-18T00:33:37ZGo MAEDA
<p>`rake yard` which generates YARD documentation raises an exception and exits immediately after startup if the Ruby version is 3.2 or higher.</p>
<p>Please see <a class="attachment" href="https://www.redmine.org/attachments/31490">error.txt</a>.</p> Redmine - Patch #39551 (Closed): Simplified Chinese translation update for 5.1-stablehttps://www.redmine.org/issues/395512023-11-15T08:09:31Zlei shi
<p>I did the translation myself, please point out if there is anything wrong!</p> Redmine - Patch #39547 (Closed): Prevent automatic requiring of unnecessary gems at runtimehttps://www.redmine.org/issues/395472023-11-14T23:26:58ZGo MAEDA
<p>We can set `require: false` to the yard gem in Gemfile. This will slightly reduce the memory used by Redmine.</p>
<p>The yard gem is only needed when executing `rake yard` and is not necessary when running the Redmine application. Moreover, since `require 'yard'` is executed internally when running `rake yard`, there is no need to load 'yard' when starting up Redmine.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/Gemfile b/Gemfile
index 5b789f927..11e6acdf8 100644
</span><span class="gd">--- a/Gemfile
</span><span class="gi">+++ b/Gemfile
</span><span class="p">@@ -89,7 +89,7 @@</span> end
group :development do
gem 'listen', '~> 3.3'
<span class="gd">- gem "yard"
</span><span class="gi">+ gem 'yard', require: false
</span> end
group :test do
</code></pre> Redmine - Defect #39527 (Closed): Deprecate unused ApplicationHelper#render_if_existhttps://www.redmine.org/issues/395272023-11-08T06:31:11ZMischa The Evil
<p><code>ApplicationHelper#render_if_exist</code> was introduced in <a class="changeset" title="Import user accounts from CSV file (#33102). Patch by Takenori TAKAKI." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19799">r19799</a> for <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Import user accounts from CSV file (Closed)" href="https://www.redmine.org/issues/33102">#33102</a>. After discussion in that issue and subsequent issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Query Links on Issues and Time Logs Import Sidebars broken (Closed)" href="https://www.redmine.org/issues/36524">#36524</a>, it was decided to remove the sidebars from the import views after all with <a class="changeset" title="Remove sidebar with invalid query links from imports views (#36524). Patch by Felix Schäfer." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/21390">r21390</a> and <a class="changeset" title="Remove sidebar views (#36524). Patch by Felix Schäfer." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/21391">r21391</a>. It looks like that with that, <code>ApplicationHelper#render_if_exist</code> became unused and obsolete.<br />If it is indeed confirmed obsolete, it might be desirable to deprecate the method and remove it (along with its tests) in the end.</p>
<p><a href="#" onclick="$('#collapse-74a5dbf8-show, #collapse-74a5dbf8-hide').toggle(); $('#collapse-74a5dbf8').fadeToggle(150);; return false;" id="collapse-74a5dbf8-show" class="icon icon-collapsed collapsible">FWIW: the names of the test methods contain a typo; s/redner/render.</a><a href="#" onclick="$('#collapse-74a5dbf8-show, #collapse-74a5dbf8-hide').toggle(); $('#collapse-74a5dbf8').fadeToggle(150);; return false;" id="collapse-74a5dbf8-hide" class="icon icon-expended collapsible" style="display:none;">FWIW: the names of the test methods contain a typo; s/redner/render.</a><div id="collapse-74a5dbf8" class="collapsed-text" style="display:none;"><ul>
<li><a class="source" href="/projects/redmine/repository/svn/revisions/22416/entry/trunk/test/helpers/application_helper_test.rb#L2189">source:/trunk/test/helpers/application_helper_test.rb@22416#L2189</a>
<ul>
<li><code>test_redner_if_exist_should_be_render_partial</code></li>
</ul>
</li>
<li><a class="source" href="/projects/redmine/repository/svn/revisions/22416/entry/trunk/test/helpers/application_helper_test.rb#L2194">source:/trunk/test/helpers/application_helper_test.rb@22416#L2194</a>
<ul>
<li><code>test_redner_if_exist_should_be_render_nil</code></li>
</ul></li>
</ul></div></p> Redmine - Patch #39513 (Closed): Bulgarian translation update for 5.1-stablehttps://www.redmine.org/issues/395132023-11-04T06:36:06ZIvan Cenov
<p>Here is Bulgarian translation, created from trunk on 04.11.2023.</p> Redmine - Feature #39511 (Closed): Auto-detection of field wrapper type when importing CSV filehttps://www.redmine.org/issues/395112023-11-03T05:17:22ZGo MAEDA
<p>In the CSV import settings, there are four fields that you have to set. Of these, the field separator and file encoding are auto-detected.</p>
<p>In addition to these, I think the field wrapper could also be auto-detected, using a similar logic to that of the field separator's auto-detection.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/import.rb b/app/models/import.rb
index fe3f24fab..2674606bb 100644
</span><span class="gd">--- a/app/models/import.rb
</span><span class="gi">+++ b/app/models/import.rb
</span><span class="p">@@ -65,12 +65,14 @@</span> class Import < ActiveRecord::Base
def set_default_settings(options={})
separator = lu(user, :general_csv_separator)
<span class="gi">+ wrapper = '"'
</span> encoding = lu(user, :general_csv_encoding)
if file_exists?
begin
content = File.read(filepath, 256)
separator = [',', ';'].max_by {|sep| content.count(sep)}
<span class="gi">+ wrapper = ['"', "'"].max_by {|quote_char| content.count(quote_char)}
</span>
guessed_encoding = Redmine::CodesetUtil.guess_encoding(content)
encoding =
<span class="p">@@ -81,7 +83,6 @@</span> class Import < ActiveRecord::Base
rescue => e
end
end
<span class="gd">- wrapper = '"'
</span>
date_format = lu(user, "date.formats.default", :default => "foo")
date_format = DATE_FORMATS.first unless DATE_FORMATS.include?(date_format)
</code></pre> Redmine - Feature #39500 (Closed): Change the default notification option for users to "Only for ...https://www.redmine.org/issues/395002023-11-01T10:12:48ZGo MAEDA
<p>Currently, the default notification option for a new user is <strong>"Only for things I watch or I'm involved in"</strong> (internal_name: only_my_events) . This sends notifications when any of the following conditions are met.</p>
<ul>
<li>The issue/object is <strong>watched</strong> by the user</li>
<li>The issue is <strong>created</strong> by the user</li>
<li>The issue is <strong>assigned</strong> to the user</li>
</ul>
<p>I think the default option should now be <strong>"Only for things I watch or I am assigned to"</strong> (internal name: only_assigned) which sends notifications when any of the following conditions are met.</p>
<ul>
<li>The issue/object is <strong>watched</strong> by the user</li>
<li>The issue is <strong>assigned</strong> to the user</li>
</ul>
<p>This is because Redmine 5.1.0 has an auto watch for newly created issues (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Auto watch issues on issue creation (Closed)" href="https://www.redmine.org/issues/38238">#38238</a>) and the option is enabled by default for newly created users, and the behavior of the combination of auto watch and only_my_events is somewhat confusing.</p>
<p>Consider the following scenario:</p>
<ol>
<li>Admin creates a new user. The user has all auto watches enabled by default, and the email notification option is set to only_my_events</li>
<li>The user creates an issue. Since all auto watches are enabled for the user, they are added as a watcher</li>
<li>The user receives notifications about the issue</li>
<li>The user decides they do not want to receive notifications anymore and unwatches the issue</li>
<li>But the user still receives notifications because the notification option is only_my_events, and they are the author of the issue</li>
</ol>
<p>If the default notification option is changed from only_my_events to only_assigned, this confusion will be eliminated. Here is a scenario in this case:</p>
<ol>
<li>Admin creates a new user. The user has all auto watches enabled by default, and the email notification option is set to only_assigned</li>
<li>The user creates an issue. Since all auto watches are enabled for the user, they are added as a watcher</li>
<li>The user receives notifications about the issue</li>
<li>The user decides they do not want to receive notifications anymore and unwatches the issue</li>
<li>The user does not receive notifications anymore because the notification option is only_assigned, and they are no longer a watcher</li>
</ol>
<p>As illustrated above, in Redmine 5.1, the behavior is more understandable if the notification option defaults to only_assigned.</p> Redmine - Patch #39430 (Closed): Japanese translation update (r22362)https://www.redmine.org/issues/394302023-10-30T09:26:04ZGo MAEDA
<p>Translated text_default_active_job_queue_changed.</p> Redmine - Feature #39400 (Closed): Migrate Stylelint to 15.11.0https://www.redmine.org/issues/394002023-10-29T01:04:44ZMischa The Evil
<p>Stylelint should be <a href="https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-15.md" class="external">migrated</a> to the <a href="https://github.com/stylelint/stylelint/releases" class="external">latest 15.x.x</a> release.</p> Redmine - Patch #39380 (Closed): Replace hardcoded issues count check with `limit` variable in Is...https://www.redmine.org/issues/393802023-10-26T10:45:27ZGo MAEDA
<p>In IssuesController#retrieve_previous_and_next_issue_ids, the value `500` appears twice. One is an assignment to the variable <code>limit</code> and the other is in a conditional expression.</p>
<pre><code class="ruby syntaxhl"> <span class="k">def</span> <span class="nf">retrieve_previous_and_next_issue_ids</span>
<span class="k">if</span> <span class="n">params</span><span class="p">[</span><span class="ss">:prev_issue_id</span><span class="p">].</span><span class="nf">present?</span> <span class="o">||</span> <span class="n">params</span><span class="p">[</span><span class="ss">:next_issue_id</span><span class="p">].</span><span class="nf">present?</span>
<span class="vi">@prev_issue_id</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:prev_issue_id</span><span class="p">].</span><span class="nf">presence</span><span class="p">.</span><span class="nf">try</span><span class="p">(</span><span class="ss">:to_i</span><span class="p">)</span>
<span class="vi">@next_issue_id</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:next_issue_id</span><span class="p">].</span><span class="nf">presence</span><span class="p">.</span><span class="nf">try</span><span class="p">(</span><span class="ss">:to_i</span><span class="p">)</span>
<span class="vi">@issue_position</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:issue_position</span><span class="p">].</span><span class="nf">presence</span><span class="p">.</span><span class="nf">try</span><span class="p">(</span><span class="ss">:to_i</span><span class="p">)</span>
<span class="vi">@issue_count</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:issue_count</span><span class="p">].</span><span class="nf">presence</span><span class="p">.</span><span class="nf">try</span><span class="p">(</span><span class="ss">:to_i</span><span class="p">)</span>
<span class="k">else</span>
<span class="n">retrieve_query_from_session</span>
<span class="k">if</span> <span class="vi">@query</span>
<span class="vi">@per_page</span> <span class="o">=</span> <span class="n">per_page_option</span>
<span class="n">limit</span> <span class="o">=</span> <span class="mi">500</span>
<span class="n">issue_ids</span> <span class="o">=</span> <span class="vi">@query</span><span class="p">.</span><span class="nf">issue_ids</span><span class="p">(</span><span class="ss">:limit</span> <span class="o">=></span> <span class="p">(</span><span class="n">limit</span> <span class="o">+</span> <span class="mi">1</span><span class="p">))</span>
<span class="k">if</span> <span class="p">(</span><span class="n">idx</span> <span class="o">=</span> <span class="n">issue_ids</span><span class="p">.</span><span class="nf">index</span><span class="p">(</span><span class="vi">@issue</span><span class="p">.</span><span class="nf">id</span><span class="p">))</span> <span class="o">&&</span> <span class="n">idx</span> <span class="o"><</span> <span class="n">limit</span>
<span class="k">if</span> <span class="n">issue_ids</span><span class="p">.</span><span class="nf">size</span> <span class="o"><</span> <span class="mi">500</span>
</code></pre>
<p>The conditional expression should use the variable <code>limit</code> instead of the hardcoded value as in the following patch.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 07de47c0d..0f997d2e6 100644
</span><span class="gd">--- a/app/controllers/issues_controller.rb
</span><span class="gi">+++ b/app/controllers/issues_controller.rb
</span><span class="p">@@ -522,7 +522,7 @@</span> class IssuesController < ApplicationController
limit = 500
issue_ids = @query.issue_ids(:limit => (limit + 1))
if (idx = issue_ids.index(@issue.id)) && idx < limit
<span class="gd">- if issue_ids.size < 500
</span><span class="gi">+ if issue_ids.size < limit
</span> @issue_position = idx + 1
@issue_count = issue_ids.size
end
</code></pre> Redmine - Feature #39238 (Closed): Redirect to repositories#show after repositories#fetch_changes...https://www.redmine.org/issues/392382023-10-25T14:34:14ZHolger Just
<p>When POST'ing to repositories#fetch_changesets, we fetch changesets and then just render the <code>show</code> page This retains the URL of the <code>fetch_changesets</code> action in the browser bar, e.g.</p>
<pre>
https://redmine.example.com/projects/test/repository/demo/fetch_changesets
</pre>
<p>Furthermore, the rendered page is the result of a POST and is thus not easily reloaded. Thus, I propose that instead of directly showing the repository again, we issue a redirect to the repository's show page. That way, the <code>fetch_changesets</code> URL is not visible ion the browser's address bar and the page can be easily reloaded.</p>
<p>This is implemented in the attached patch.</p> Redmine - Patch #39181 (Closed): /users backwards API compatibility https://www.redmine.org/issues/391812023-10-11T09:38:22ZJens Krämerjk@jkraemer.net
<p><a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Upgrade Admin/Users list to use the query system (Closed)" href="https://www.redmine.org/issues/37674">#37674</a> changed the <code>/users</code> endpoint behavior by dropping support for the previously supported <code>status</code> and <code>name</code> URL parameters. This might break API clients that relied on these parameters. Further the functionality of the 'Name' filter, which allowed to do a combined search across users' name, email and login was lost for both API and Browser clients.</p>
<p>The attached patch that's been extracted from <a href="https://plan.io/redmine-hosting" class="external">Planio</a> introduces a new 'Name, email or login' query filter and maps the legacy 'name' URL parameter to this new filter. Also, a 'status' URL parameter will be mapped to a query on 'status_id' if present.</p> Redmine - Patch #38820 (Closed): Retry in case of stale issue during Issue.update_versionshttps://www.redmine.org/issues/388202023-07-06T14:20:19ZJens Krämerjk@jkraemer.net
<p>This is quite the corner case but we had this issue occur with one client at <a href="https://plan.io/redmine-hosting" class="external">Planio</a>:</p>
<p>With <code>Setting.parent_issue_priority == 'derived'</code>, while setting a projects' parent project to nil, several issues that belonged to now inaccessible versions were updated in <code>Issue.update_versions</code>. In one case, this led to a situation where an issues' parent issue priority was updated, before that parent issue was being processed in the loop in <code>Issue.update_versions</code>. The attempt to then set the parent issues' version to <code>nil</code> later failed with a StaleObjectError due to the previous save from <code>Issue#update_parent_attributes</code>.</p>
<p>The attached patch against current master fixes that by catching the error and retrying once with a reloaded version of the issue. It also contains a test case that reproduces the issue (with MySQL, at least - the bug only shows when the child issue is processed before the parent in <code>update_versions</code>, so it depends on the order in which issues are fetched there)</p> Redmine - Feature #38730 (Closed): Generate snake-case file name by redmine_plugin_migrationhttps://www.redmine.org/issues/387302023-06-16T04:42:58ZHaruka Asakura
<p>redmine_plugin_migration must generate snake-case file name when specifying migration name as camel-case due to the consistency of the behavior, but it generates camel-case file name.</p>
<p>So we have created the patch for fixing redmine_plugin_migration behavior.</p>
<p>FYI: There was a similar issue that <a class="external" href="https://www.redmine.org/issues/28668">https://www.redmine.org/issues/28668</a></p> Redmine - Defect #38707 (Closed): Fix order of loading plugins' config/routes.rbhttps://www.redmine.org/issues/387072023-06-13T12:36:56ZNishida Yuya
<p>When loading <code>init.rb</code>, uses sort (<a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/5.0.5/lib/redmine/plugin_loader.rb#L117">source:tags/5.0.5/lib/redmine/plugin_loader.rb#L117</a>), but loading plugin's <code>config/routes.rb</code> does not uses sort (<a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/5.0.5/config/routes.rb#L400">source:tags/5.0.5/config/routes.rb#L400</a>). In ruby-2.7 or earlier, <code>Dir.glob</code> does not sort. So, loading <code>init.rb</code> and loading plugin's <code>config/routes.rb</code> are different.</p>
<p>This issue includes following patches:</p>
<ul>
<li><a class="attachment" href="https://www.redmine.org/attachments/30642">0001-fix-order-of-loading-plugins-config-routes.rb.patch</a> : minimal changes to fix with tests.</li>
<li><a class="attachment" href="https://www.redmine.org/attachments/30643">0002-refactor-to-more-simply-code.patch</a> : refactor related codes.</li>
</ul> Redmine - Feature #38585 (Closed): Drop Ruby 2.7 supporthttps://www.redmine.org/issues/385852023-05-24T12:33:40ZC S
<p>Ruby 2.7 is EOL (<a class="external" href="https://www.ruby-lang.org/en/downloads/branches/">https://www.ruby-lang.org/en/downloads/branches/</a>)<br />Since Redmine 4.2 supports Ruby 2.7 at most, this should also be set to EOL...</p> Redmine - Defect #38509 (Closed): Untranslated string "OK" in the repository browserhttps://www.redmine.org/issues/385092023-05-03T07:08:35ZGo MAEDA
<p>An untranslated string "OK" is used in the repository browser. The attached patch changes the hard-coded "OK" to "View" (<code>button_view</code>).</p>
<p>The issue was pointed out in <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Some unlocalize string (New)" href="https://www.redmine.org/issues/31698">#31698</a> by <a href="https://www.redmine.org/users/351215" class="external">Kam Nazir</a>.</p>
<p><img src="https://www.redmine.org/attachments/download/30401/clipboard-202305031606-xgclf.png" style="width: 1071px;border: 1px solid grey;" alt="" /></p> Redmine - Defect #38493 (Closed): The related issues count on the issue view is not updated after...https://www.redmine.org/issues/384932023-04-25T23:01:13ZTakashi Kato
<p>Attached is a patch to fix it.</p>
<p>(Off topic, but the Affected Version list on the issue submission view does not seem to have been updated).</p> Redmine - Feature #38216 (Closed): Add template filenames as comments to HTML output in developme...https://www.redmine.org/issues/382162023-01-28T07:04:51ZTakashi Kato
<p>This patch adds HTML comments to the rendered output indicating where each template begins and ends in development and test mode.</p>
<p>This feature has been added since rails 6.1.</p>
<p>see<br /><a href="https://github.com/rails/rails/pull/38848" class="external">.annotate_template_file_names annotates HTML output with template names #38848</a><br /><a href="https://github.com/rails/rails/pull/39204" class="external">Add the configuration option for annotating templates with file names to the generated app #39204</a></p>
<p><img src="https://www.redmine.org/attachments/download/30147/erb_filenames.png" alt="" /></p> Redmine - Defect #38155 (Closed): RuntimeError when reloading Rails consolehttps://www.redmine.org/issues/381552023-01-05T17:24:51ZThomas Löber
<p>Hi!</p>
<p>When I start a Rails console in <em>development</em> and at some point run a <code>reload!</code> to reload changes I have just made to the source code, I get a <code>RuntimeError</code>:</p>
<pre>
> rails console
Loading development environment (Rails 6.1.7)
irb(main):001:0> reload!
Reloading...
Traceback (most recent call last):
7: from config/initializers/30-redmine.rb:11:in `block in <top (required)>'
6: from lib/redmine/preparation.rb:163:in `prepare'
5: from lib/redmine/menu_manager.rb:251:in `map'
4: from lib/redmine/preparation.rb:164:in `block in prepare'
3: from lib/redmine/menu_manager.rb:321:in `push'
2: from lib/redmine/menu_manager.rb:403:in `add'
1: from lib/redmine/menu_manager.rb:386:in `add_at'
RuntimeError (Child already added)
</pre>
<p>The source of the error is <code>Redmine::Preparation.prepare</code>, which is called in this <code>to_prepare</code> block in <code>config/initializers/30-redmine.rb</code>:</p>
<pre>
Rails.application.config.to_prepare do
I18n.backend = Redmine::I18n::Backend.new
# Forces I18n to load available locales from the backend
I18n.config.available_locales = nil
Redmine::Preparation.prepare
end
</pre>
<p>The reason for the error is that <code>Rails.application.reloader.reload!</code> correctly runs the <code>prepare</code> callbacks twice, but <code>Redmine::Preparation.prepare</code> does not support being called multiple times.</p>
<p>From <a class="external" href="https://github.com/rails/rails/pull/28111#issuecomment-285370954">https://github.com/rails/rails/pull/28111#issuecomment-285370954</a>:</p>
<blockquote>
<p>We already call prepare a thoroughly variable number of times -- if your prepare handler isn't idempotent, you're going to have a bad time.</p>
</blockquote>
<p>So I changed the classes used in <code>Redmine::Preparation</code> to be idempotent. Please see the attached patch.</p>
<p>Now reloading works:</p>
<pre>
Reloading...
=> true
</pre>
<p>Best regards,<br />Thomas</p> Redmine - Patch #37987 (Closed): Update Stylelint to 14.16.0 https://www.redmine.org/issues/379872022-12-01T13:56:20ZGo MAEDA
<p><a class="external" href="https://github.com/stylelint/stylelint/releases">https://github.com/stylelint/stylelint/releases</a></p> Redmine - Feature #37679 (Closed): Raise the maximum length of the last name to 255 charactershttps://www.redmine.org/issues/376792022-09-15T19:30:37ZAnthony Mallet
<p>According to <a class="changeset" title="Raised group name maximum length to 255 characters (#13174)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/11392">r11392</a>, the lastname length is increased to 255 characters.</p>
<p>It seems that the user validations was never updated accordingly and I have some users hitting the limit in a legitimate way.</p>
<p>Would the attached patch be enough to fix the issue?</p> Redmine - Feature #37621 (Closed): Add field separator option to CSV export dialoghttps://www.redmine.org/issues/376212022-08-30T07:53:59ZKarel Pičman
<p>I would like to add a field separator option to the CVS export option form.</p>
<p>Background:</p>
<p>If I have set the language e.g. to English in my Redmine profile, the separator is taken from <em>config/locales/en.yml</em> (<code>general_csv_separator</code>) and it is <strong>comma</strong>. If I have installed e.g. German Microsoft Office and try to open such a CSV, it expects that the separator is <strong>semicolon</strong>. Unfortunately, Microsoft Office doesn't offer to choose the separator prior opening a CSV file and always uses the default value.</p>
<p><img src="https://www.redmine.org/attachments/download/29617/field_separator_export_option.png" alt="" /></p>
<p>It is also related to <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Wrong csv separator in Hungarian (New)" href="https://www.redmine.org/issues/37581">#37581</a>, where many translations have set <code>general_csv_separator</code> to different value than is expected in Microsoft Office.</p> Redmine - Feature #37617 (Closed): Add description field to custom fields APIhttps://www.redmine.org/issues/376172022-08-29T16:26:35ZHolger Just
<p>The description field is missing from the API response of <code>custom_fields#index</code>.</p>
<p>The attached patch adds this field.</p> Redmine - Feature #37532 (Closed): Add CSS class for relation type to related issues listhttps://www.redmine.org/issues/375322022-07-31T09:17:45Zsalman mp
<p>There is a function <code>css_classes_for</code> in <code>IssueRelation</code> but only used when displaying relation column in query results.<br />It's useful to add classes in relations list in issue details.</p> Redmine - Patch #37507 (Closed): Normalize HTML in app/views/settings/_users.html.erbhttps://www.redmine.org/issues/375072022-07-27T15:49:01ZHolger Just
<p>In other settings pages, if there are tabular settings, they are encased in a <code><div class="tabular settings"></code> rather than adding the classes fdirectly to the fieldset (e.g. in <code>_authorization.html.erb</code>). This patch adjusts the generated HTML accordingly.</p>
<p>It also removes some special CSS rules for these setting pages which were introduced in <a class="changeset" title="Moved new project member to its own action MemberController#new." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13600">r13600</a>. I'm actually not really sure why these rules are there. In a default Redmine, they only move things slightly around in an inconsistent way. With custom themes, these rules have the possibility to mess things up.</p>
<p>In any case, I think those rules can just be removed outright:</p>
<ul>
<li><code>splitcontentleft</code> / <code>splitcontentright</code> is not used on this partial at all</li>
<li>the fieldset and labels should be rendered the same way as on all other pages instead of slightly different paddings / margins.</li>
<li>there is no tag with a <code>principal</code> id there</li>
</ul> Redmine - Defect #37390 (Closed): Extraneous whitespace when selecting and copying issue number o...https://www.redmine.org/issues/373902022-07-07T10:33:17ZFelix Schäfer
<p>On Chrome and Chrome-derived browsers on Windows, when selecting the issue number in the title an extra whitespace at the end of the issue number.</p>
<p>Our analysis shows this is due to the combination of the <code>class="inline-flex"</code> and the newline <code>\n</code> separating the <code>h2</code> title and the open/closed <code>span</code>.</p>
<p>One way to fix this would be to remove the <code>inline-flex</code> css directive from the <code>h2</code> title, this breaks the layout though. Another way would be to remove the <code>\n</code> between the <code>h2</code> and <code>span</code> elements. This might require some additional margin between the <code>h2</code> and <code>span</code> elements as the <code>\n</code> causes a visible space between the 2 elements.</p> Redmine - Patch #37248 (Closed): Update RuboCop Rails to 2.22https://www.redmine.org/issues/372482022-06-14T13:21:22ZGo MAEDARedmine - Feature #35755 (Closed): Drop OpenID supporthttps://www.redmine.org/issues/357552021-08-13T06:49:34ZGo MAEDA
<p>Redmine currently supports OpenID authentication.</p>
<p>However, OpenId was obsoleted by OpenID Connect some years ago and most OpenID providers discontinued their services. Now it is very difficult to find a web service with an OpenID provider service. This means that it is difficult for Redmine users to start using OpenID login. And it is not easy for us to test if Redmine's OpenID support is working properly.</p>
<p>Given this situation, probably very few users are using OpenID login in Redmine. I think it is time to remove OpenID support from Redmine.</p> Redmine - Feature #35450 (Closed): Better validation error message when the domain of email is no...https://www.redmine.org/issues/354502021-06-24T02:00:04ZYuichi HARADA
<p>When registering an email address with a disallowed email domain with "My account > Email", the error message "Email is invalid" is displayed.</p>
<p><img src="https://www.redmine.org/attachments/download/27618/current-error-message.png" style="width:400px;border:1px solid grey;" alt="" /></p>
<p>I don't understand what the error message wants to convey, so fixed the error message.</p>
<p><img src="https://www.redmine.org/attachments/download/27619/fixed-error-message.png" style="width:400px;border:1px solid grey;" alt="" /></p> Redmine - Feature #34025 (Closed): Raise the maximum length of the title element in the Atom feed...https://www.redmine.org/issues/340252020-09-22T13:59:54ZIker Mendiola
<p>The atom feed from a Project does not truncate the subjects, but using the link for All Projects does it. <br />Even using redmine.org > Projects > View all issues > Atom, issue 33965 is truncated:</p>
<pre>
<title>Redmine - Defect #33965 (New): REST API: Method Not Available see used Status list as per the tra...</title>
<link rel="alternate" href="https://www.redmine.org/issues/33965"/>
</pre> Redmine - Feature #33682 (Closed): Display calendar in vertical list layout on mobile screenshttps://www.redmine.org/issues/336822020-06-30T13:27:02ZAkiko Takano
<p>I think the default calendar layout for responsive mode is small and a little hard to see.</p>
<p>It would be user-friendly if the user could change the calendar view from the default to a vertical list style.</p>
<p>I've just created the theme which can change calendar view via JavaScript.<br />I attached the sample screenshot. I hope it would be help.</p>
<p><img src="https://www.redmine.org/attachments/download/25630/calendar-ui-proposal.png" alt="" /></p> Redmine - Feature #33660 (Closed): Information text on sudo password entryhttps://www.redmine.org/issues/336602020-06-24T08:10:29ZFelix Schäfer
<p>People not familiar with sudo mode might be surprised by having to enter their password. The upcoming patch adds a small help text and a password forgotten link to sudo mode password prompts.</p> Redmine - Patch #33638 (Closed): Add informative default welcome text for new installationshttps://www.redmine.org/issues/336382020-06-20T06:09:37ZGo MAEDA
<p>Currently, the default value of "Welcome text" is not defined. As a result, Redmine shows a blank Home page to users who access Redmine just after installation. And some users don't know that they can put any text on the Home page by setting "Welcome text" in the Administration panel.</p>
<p>Those small problems can be resolved by setting a short default text to the setting.</p>
<p><img src="https://www.redmine.org/attachments/download/25585/welcome-text-before.png" style="width: 976px;border: 1px solid grey;" alt="" /></p>
<p><img src="https://www.redmine.org/attachments/download/25586/welcome-text-after.png" style="width: 976px;border: 1px solid grey;" alt="" /></p> Redmine - Patch #33413 (Closed): Complete Hungarian/magyar hu.yml for Redmine 4.1.1https://www.redmine.org/issues/334132020-05-07T14:09:41ZGreg T
<p>Related to <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: hu.yml for Redmine 3.4 (Closed)" href="https://www.redmine.org/issues/28509">#28509</a>.<br /><a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: stop misusing distance_in_words (Closed)" href="https://www.redmine.org/issues/25402">#25402</a> is recommended.</p> Redmine - Defect #32985 (Closed): Remove unnecessary use of instance variables in CSV and Atom re...https://www.redmine.org/issues/329852020-02-11T20:16:09ZKo Nagase
<p>I set "10000" as "Issues export limit" (instead of default "500") for some reasons,<br />but I noticed that exporting around 10,000 issues CSV causes out of memory issue.</p>
<p>I thought that the cause is inside some plugins, but it seems to be happen without any plugins,<br />and after changing the following Issues Controller part, the memory usage seems to become stable (no memory leak).<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 69a947b03..6596df30c 100644
</span><span class="gd">--- a/app/controllers/issues_controller.rb
</span><span class="gi">+++ b/app/controllers/issues_controller.rb
</span><span class="p">@@ -63,8 +63,8 @@</span> class IssuesController < ApplicationController
render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}")
}
format.csv {
<span class="gd">- @issues = @query.issues(:limit => Setting.issues_export_limit.to_i)
- send_data(query_to_csv(@issues, @query, params[:csv]), :type => 'text/csv; header=present', :filename => 'issues.csv')
</span><span class="gi">+ tmp_issues = @query.issues(:limit => Setting.issues_export_limit.to_i)
+ send_data(query_to_csv(tmp_issues, @query, params[:csv]), :type => 'text/csv; header=present', :filename => 'issues.csv')
</span> }
format.pdf {
@issues = @query.issues(:limit => Setting.issues_export_limit.to_i)
</code></pre></p>
Ruby process memory usage
<table>
<tr>
<td> Pattern </td>
<td> Initial </td>
<td> 1st </td>
<td> 2nd </td>
<td> 3rd </td>
</tr>
<tr>
<td> Before modification </td>
<td> 126.4 MB </td>
<td> 1.20 GB </td>
<td> 1.92 GB </td>
<td> 973.4 MB </td>
</tr>
<tr>
<td> After modification </td>
<td> 131.4 MB </td>
<td> 1.04GB </td>
<td> 776.3 MB </td>
<td> 803.5 MB </td>
</tr>
</table>
<p>I am not sure whether above modification is correct, so someone's review is quite helpful...</p>
Here is my local reproducible environment:
<ul>
<li>Redmine: 4.0.5</li>
<li>OS: macOS Mojave</li>
<li>Ruby: 2.6.5</li>
<li>DB: PostgreSQL 12</li>
<li>Server: Puma</li>
</ul>
<p>Thanks,</p> Redmine - Defect #31507 (Closed): Test fails if trailing whitespaces are removedhttps://www.redmine.org/issues/315072019-06-03T20:08:25ZMarius BĂLTEANU
<p>The test <code>test_partials_with_html_entities</code> fails if the trailing whitespaces are removed. The attached patch can be used to reproduce the below problem:</p>
<pre><code>
notroot@eb7d0b73147d:/work$ ruby test/unit/lib/redmine/unified_diff_test.rb -n test_partials_with_html_entities
DEPRECATION WARNING: `secrets.secret_token` is deprecated in favor of `secret_key_base` and will be removed in Rails 6.0. (called from <top (required)> at /work/config/environment.rb:16)
Run options: -n test_partials_with_html_entities --seed 55482
# Running:
E
Error:
Redmine::UnifiedDiffTest#test_partials_with_html_entities:
NoMethodError: undefined method `html_line_left' for nil:NilClass
test/unit/lib/redmine/unified_diff_test.rb:106:in `test_partials_with_html_entities'
bin/rails test test/unit/lib/redmine/unified_diff_test.rb:92
</code></pre>
<p>I wasn't able to fix the test without changing the diff, any solution is welcome.</p> Redmine - Feature #31505 (Closed): Mark edited journal notes as "Edited"https://www.redmine.org/issues/315052019-06-03T19:55:25ZMarius BĂLTEANU
<p>The attached patch marks the edited notes as "Edited", showing on hover the author and time of the last edit.<br /><img src="https://www.redmine.org/attachments/download/23230/edited.png" style="width: 50%;border: 1px solid grey;" alt="" /></p>
<p>This issue is related to <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: diffs for editions of issue/notes entries (New)" href="https://www.redmine.org/issues/12388">#12388</a>, but I chose to open a new issue because in that ticket the request is to journalise the changes as well which is not implemented by this patch.</p> Redmine - Feature #29208 (Closed): Support email addresses with IDN (internationalized domain nam...https://www.redmine.org/issues/292082018-07-07T07:01:18ZGo MAEDA
<p>This is a patch to add IDN (internationalized domain names) support to email addresses of user accounts.</p>
<p>Currently, Redmine does not accept IDN email addresses like "joe@ドメイン名例.jp" and its ASCII expression "<a class="email" href="mailto:joe@xn--eckwd4c7cu47r2wf.jp">joe@xn--eckwd4c7cu47r2wf.jp</a>" when creating/updating a user account. After applying this patch, both expressions will be accepted.</p>
<p>According to IDN World Report, there are <a href="https://idnworldreport.eu/year-2017/facts-and-figures/idn-growth/" class="external">approx 8.7 millions</a> IDNs in the world as of December 2016, and those <a href="https://idnworldreport.eu/maps/idn-world-map/" class="external">are used in many countries</a>. To support IDN email addresses should be beneficial for many people.</p>
<p>This patch converts Unicode domain names to traditional ASCII domain names just before saving an email address. However, it does not convert ASCII domain names to Unicode domain names when displaying email address. Users will see ASCII expression "<a class="email" href="mailto:joe@xn--eckwd4c7cu47r2wf.jp">joe@xn--eckwd4c7cu47r2wf.jp</a>" on my_account page even if they have entered Unicode email address "joe@ドメイン名例.jp".</p>
<p>This approach can minimize the change to existing code and works fine with IDN-unaware MTAs and plugins while allowing people to use IDN email addresses.</p>
<p><strong>"Email" field accepts Unicode domain names:</strong><br /><img src="https://www.redmine.org/attachments/download/21050/idn-support-screenshot-1.png" style="border: 1px solid #ccc;" alt="" /></p>
<p><strong>ASCII converted email address is shown after saving:</strong><br /><img src="https://www.redmine.org/attachments/download/21051/idn-support-screenshot-2.png" style="border: 1px solid #ccc;" alt="" /></p>
<p>References:</p>
<ul>
<li><a href="https://idnworldreport.eu/" class="external">IDN World Report – Official World Report on Internationalised Domain Names</a></li>
<li><a href="https://www.punycoder.com/" class="external">Punycoder - the Punycode converter (IDN converter)</a></li>
</ul> Redmine - Defect #28243 (Closed): Principal.not_member_of scope does not accept ActiveRecord::Rel...https://www.redmine.org/issues/282432018-02-25T19:46:39ZAnonymous
<p>Principal model has the following two scopes: member_of and not_member_of, both of them expect project or collection of projects as an argument. The problem is that given <pre>projects = Project.where(:name => 'My Project')</pre> you'll get correct results from <pre>Principal.member_of(projects)</pre>, but an exception will be thrown if you'll try to run <pre>Principal.not_member_of(projects)</pre>. That's because not_member_of puts its argument into an array if it's not a subclass of Array (which Project::ActiveRecord_Relation is not, though it knows how to #map).</p>
<p>I think one should be able to call both member_of and not_member_of with any kind of project collection, not just Array, and both of them should process arguments in the same way. So I provide a patch for that.</p> Redmine - Patch #23328 (Closed): Optimize Project#notified_users to improve issue create/update s...https://www.redmine.org/issues/233282016-07-14T09:35:52ZVictor Campos
<p>Hi guys,<br />When Redmine look for what members it should send e-mail, they interate one by one fetching principal.<br />This is a N + 1 Query problem.</p>
<p>When we have more then 5K users in one project it is a problem. So with a single line change I drop the time for update issue from 5 to 2 seconds.</p>
<p>I hope this help you.</p>
<pre><code class="diff syntaxhl"><span class="p">Date: Tue Jul 12 19:37:14 2016 -0300
</span>
improve update/create speed
diff --git a/app/models/project.rb b/app/models/project.rb
<span class="gh">index 660a486..88bd8eb 100644
</span><span class="gd">--- a/app/models/project.rb
</span><span class="gi">+++ b/app/models/project.rb
</span><span class="p">@@ -524,7 +524,7 @@</span> class Project &lt; ActiveRecord::Base
# Returns the users that should be notified on project events
def notified_users
# TODO: User part should be extracted to User#notify_about?
<span class="gd">- members.select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal}
</span><span class="gi">+ members.includes(:principal).select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal}
</span> end
# Returns a scope of all custom fields enabled for project issues
</code></pre> Redmine - Feature #22024 (Closed): Support localized decimal separators for float valueshttps://www.redmine.org/issues/220242016-02-12T19:37:53ZRafael Neves
<p>Hi.I´m using redmine 2.6.2. I have created a custom field wich type is float. I want to use comma as decimal separator.</p>
<p>But when i set locale to , pt or pt-BR, for instance, if the user inputs a<br />float like '95,70' or '500,25' in a form input, numerical<br />validation will yield an 'invalid_number' error, even though this is a<br />valid format in Brazil.</p>
<p>Only works if i use dot as decimal separator... but it is not the right way to do it.</p>
<p>Is that a newer version of redmine that fix it ?</p>
<p>How we that uses comma as decimal separator deals with with number formats in redmine?</p>
<p>Thanks!</p> Redmine - Feature #21677 (Closed): Support localized decimal separator for hours in the web UIhttps://www.redmine.org/issues/216772016-01-08T12:05:57ZFelix Schäfer
<p>We have localised decimal separators for times in CSV exports <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Timelog hours decimal format (Closed)" href="https://www.redmine.org/issues/1372">#1372</a>, this isn't used for times in the web UI though.</p> Redmine - Feature #21589 (Closed): empty password should say "enter password also"https://www.redmine.org/issues/215892015-12-23T06:05:03ZSujan Shrestha
<p>entering only username with empty password<br />should say "enter password also".</p> Redmine - Feature #20620 (Closed): Add data-text-formatting attribute for selected markup languag...https://www.redmine.org/issues/206202015-08-26T07:33:34ZFelix Schäfer
<p>(I looked in trunk for a solution and in the issues for a request but couldn't find anything, I'm sorry if this is a duplicate or already solved)</p>
<p>We (plan.io) currently add 2 buttons to the wiki toolbar, one as described in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Code highlighting toolbar button (Closed)" href="https://www.redmine.org/issues/14937">#14937</a> and another from a plugin, which insert markup-sensitive content to the edited text. Those buttons are added from included javascript files, there currently is no easy way to find out which markup is selected from the js.</p>
<p>Knowing the markup used in the js would allow setting the correct markup/function for the added buttons directly in the js.</p>
<p>While there are a few other possibilities to achieve this (load different js files from the plugins depending on the selected markup, this adds complexity on the js side either because of duplication, loading 2 files for the markup-specific and common code, and so on).</p>
<p>The simplest change we could come up with would be to add a line similar to:</p>
<pre><code class="ruby syntaxhl"><span class="n">javascript_tag</span><span class="p">(</span><span class="s2">"var wikiMarkup = 'textile';"</span><span class="p">)</span> <span class="o">+</span>
</code></pre>
<p>to <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/3.1.0/lib/redmine/wiki_formatting/textile/helper.rb#L35">source:/tags/3.1.0/lib/redmine/wiki_formatting/textile/helper.rb#L35</a>, the same for markdown.</p>
<p>Is this something that could be added to Redmine, or how should markup-dependent javascript be handled? Thanks.</p> Redmine - Feature #15201 (Closed): Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/152012013-10-25T09:43:44ZJan Niggemann (redmine.org team member)jan.niggemann@redmine.org
<p>Scenario<br />User leaves company -> profile gets locked<br />User still has issues assigned, but it's not possible to set a filter "Assignee=UserWhoLeft"</p> Redmine - Feature #14275 (Closed): Add hinting to custom fieldshttps://www.redmine.org/issues/142752013-06-13T12:14:18ZBrett Patterson
<p>I have developed a plugin called "redmine_custom_field_hints" which seems that it may lend itself to the core as a nice feature.</p>
<p>While there is the option to specify a default value for custom options, there is no way to provide a static "hint" which disappears when the user focuses the input and reappears if the input is empty when blurred.</p>
<p>This module only applies to issue custom fields; however, it can easily be expanded to all other custom field types. It will only work with "string", "text", and "date" input types.</p>
<p>This feature "push" was requested by <a href="https://github.com/bpat1434/redmine_custom_field_hints/issues/1" class="external">cforce</a></p>
<p>Plugin Repository: <a class="external" href="https://github.com/bpat1434/redmine_custom_field_hints">https://github.com/bpat1434/redmine_custom_field_hints</a></p> Redmine - Feature #7360 (Closed): Issue custom query: default query per instance, project and userhttps://www.redmine.org/issues/73602011-01-18T14:51:24ZMike Kokhanov
<p>It would be nice to be able to create a default custom query, so when I get to issue list of a project, I don't need to select my preferable custom query from the list.</p> Redmine - Defect #6254 (Closed): Remove "Unknown user" notification on password request with non-...https://www.redmine.org/issues/62542010-08-31T09:48:03ZAron Rotteveel
<p>Currently, it is possible to retrieve valid e-mailaddreses from the system by simply trying to request a password for it. If the emailaddress is not valid, Redmine will show a notification stating this.</p>
<p>It would be better to have this form output a success message in every scenario in order to make e-mail harvesting harder.</p> Redmine - Feature #2746 (Closed): Send out issue priority in the email notification headerhttps://www.redmine.org/issues/27462009-02-13T18:10:06ZBrad Beattie
<p>The attached patch will send out an issue's priority with the notification email's headers. This is important for when you want to route urgent tickets differently.</p> Redmine - Feature #2631 (Closed): Add breadcrumbs to news pageshttps://www.redmine.org/issues/26312009-01-31T17:06:54ZBrad Beattie
<pre>
Index: app/views/news/show.rhtml
===================================================================
--- app/views/news/show.rhtml (revision 2338)
+++ app/views/news/show.rhtml (working copy)
@@ -1,3 +1,5 @@
+<%= breadcrumb link_to(l(:label_news_plural), {:controller => 'news', :action => 'index', :project_id => @project}) %>
+
<div class="contextual">
<%= link_to_if_authorized l(:button_edit),
{:controller => 'news', :action => 'edit', :id => @news},
</pre> Redmine - Feature #2568 (Closed): Description for issue statuseshttps://www.redmine.org/issues/25682009-01-23T10:15:22ZThomas Woelfle
<p>We have the problem that users are not always sure what the semantic of a certain status is and what status they should set for a ticket when updating it.</p>
<p>Therefore it would be nice to be able to add a documentation to issue statuses, especially when introducing custom statuses. The documentation could then be presented to the user as a tooltip when selecting a status for a ticket.</p> Redmine - Feature #1069 (Closed): Open Help in a separate tabhttps://www.redmine.org/issues/10692008-04-15T21:27:05ZJon Morrow
<p>The help link in the top menu should launch in a new page. As it currently works if a user clicks this link they are taken to redmine.org. If they then navigate around to find their solution they will have to hit the back button numerous times before they are returned to their project page. I was trying to look into this and provide a patch but do not know ruby at all. I will keep looking into and post said patch if I figure it out. BTW - Great software.</p>