Is it possible to change the increment value for the "% Done" field

Redmine has a% Done field that is used to track the progress of the problem. By default, the list box contains values ​​in increments of 10% from 0 to 100. Is it possible to change the list to a single text field so that I can enter any integer from 0 to 100 or change the list to display all integers from 0 to 100? I know that I can create a custom field for this, but I want to use the built-in if possible.

+3
source share
1 answer

In your redmine program, find the file

\app\views\issues\_attributes.rthml

The code for setting the increment 10% is on line 38 (Version 1.1.0)

<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>

, 1 10 1, 10 %. , .

, 5%

<p><%= f.select :done_ratio, ((0..10).step(0.5).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>

Redmine, 0,5, , . , ,

<p><%= f.select :done_ratio, ((0..100).step(5).to_a.collect {|r| ["#{r} %", r] }) %></p>

1% .

\app\views\issues\_form_update.rthml

, .

+6

Source: https://habr.com/ru/post/1795286/


All Articles