Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0c9f58d
Remove dubugging code for production
nanego Mar 14, 2022
d2888c1
Update reminders rake task: add max_delay
nanego Mar 14, 2022
1ce562a
Update reminder rake task
nanego Mar 14, 2022
bc2799d
Improve comments
nanego Mar 29, 2022
c651a17
Update CI config: add latest Redmine releases
nanego Mar 29, 2022
a5766ec
Add new 'Range' custom-field format
nanego May 31, 2022
f216365
Range input field: display selected value
nanego May 31, 2022
2b88d89
Add option to activate Select2 on core select filters
jtilatti Jun 2, 2022
306a5ed
Mettre à jour la table disabled_custom_field_enumerations en cas de s…
Jun 8, 2022
85db6f9
Delete disabled_fields when destroying related project or custom_field
nanego Jun 13, 2022
f59c874
Apply default value when field is required but not set
nanego Jun 13, 2022
7abe019
Merge remote-tracking branch 'origin/preprod'
nanego Jun 13, 2022
28611d2
Update CI config: add latest Redmine releases
nanego Jun 22, 2022
09447bc
Improve compatibility with RedmineLimitedVisibility plugin
nanego Aug 2, 2022
d3c4683
Fix performance issue when filtering by custom-values
nanego Aug 9, 2022
f52597c
Add missing dependency
nanego Aug 9, 2022
641e53e
Pouvoir filtrer les projets par modules activés
Sep 9, 2022
3dd8805
Complete Readme and include new enabled-modules filter and column
nanego Sep 12, 2022
96a19ff
Forbid issue copy for specific trackers
Yalaeddin Oct 5, 2022
504e21f
Minor update in Readme
nanego Oct 6, 2022
27a28b0
Rename prevent-issue-copy attribute and complete Readme
nanego Oct 6, 2022
4f65d91
Puma 6 is breaking capybara test - Keep using Puma 5 for now in tests
nanego Oct 24, 2022
30ae7cb
Revert previous patch - Perfs must have been fixed in Redmine 4.2.8
nanego Oct 24, 2022
7618835
Fix Gemfile
nanego Oct 24, 2022
a377e7d
Remove Gemfile
nanego Oct 24, 2022
3bf2952
CI config: keep using Puma 5 for now - Capybara tests are broken with…
nanego Oct 25, 2022
9360c13
Update CI config: use actions-checkout-v3 which depends on node 16 in…
nanego Nov 15, 2022
2f4f684
Add ability to disable hidden-mails-addresses feature
Yalaeddin Nov 15, 2022
48c9c34
Update CI config: add latest Redmine releases
nanego Dec 7, 2022
9ed26e6
Update CI config: use Ruby 2.7 when testing Redmine 4.2
nanego Jan 17, 2023
f74c00b
CI config: keep using Ruby 2.6 with Redmine 4.1
nanego Jan 17, 2023
2bcfb52
Complete Readme with latest added feature
nanego Jan 19, 2023
cbb1f1b
No need to create a new module to add this permission
nanego Jan 19, 2023
77e0e33
Réduire le temps de chargement de la page de visualisation d'une demande
Jan 6, 2023
7be173e
Ajouer l'option load_issue_edit dans la configuration de ce plugin
Jan 10, 2023
c02d2f8
Ajouter le test d'option load_issue_edit
Jan 10, 2023
8f3c359
corriger la comentaire
Jan 10, 2023
330e4e3
Rendre le formulaire edit/issue by ajax
Jan 24, 2023
a7e4e5a
Ajouter _action_menu qui manque apres avoir fait rebaase
Jan 24, 2023
854270e
Remettre la valeur à 0, à la fin de méthode de test
Jan 25, 2023
44baefc
Remettre la valeur à 0, avant de méthode de test
Jan 25, 2023
a7a5525
Corriger les configuration de Setting
Jan 25, 2023
1b89de2
renommer l'option + ajouter une variable pour que la requête Ajax ne…
Feb 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/4_1_6.yml → .github/workflows/4_1_7.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Tests 4.1.6
name: Tests 4.1.7

env:
PLUGIN_NAME: redmine_tiny_features
REDMINE_VERSION: 4.1.6
REDMINE_VERSION: 4.1.7
RAILS_ENV: test

on:
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout Redmine
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: redmine/redmine
ref: ${{ env.REDMINE_VERSION }}
Expand Down Expand Up @@ -72,15 +72,16 @@ jobs:
sudo mv policy.xml /etc/ImageMagick-6/policy.xml

- name: Setup Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Setup Bundler
run: gem install bundler -v '~> 1.0'

- name: Checkout dependencies - Base RSpec plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_rspec
path: redmine/plugins/redmine_base_rspec
Expand Down Expand Up @@ -113,19 +114,19 @@ jobs:
bundle exec rails test:scm:setup:subversion

- name: Checkout dependencies - Base Deface plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_deface
path: redmine/plugins/redmine_base_deface

- name: Checkout dependencies - Base StimulusJS plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nanego/redmine_base_stimulusjs
path: redmine/plugins/redmine_base_stimulusjs

- name: Checkout plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: redmine/plugins/${{ env.PLUGIN_NAME }}

Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/4_2_4.yml → .github/workflows/4_2_9.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Tests 4.2.4
name: Tests 4.2.9

env:
PLUGIN_NAME: redmine_tiny_features
REDMINE_VERSION: 4.2.4
REDMINE_VERSION: 4.2.9
RAILS_ENV: test

on:
Expand All @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
ruby: ['2.6']
ruby: ['2.7']
db: ['postgres']
fail-fast: false

Expand All @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout Redmine
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: redmine/redmine
ref: ${{ env.REDMINE_VERSION }}
Expand Down Expand Up @@ -72,22 +72,24 @@ jobs:
sudo mv policy.xml /etc/ImageMagick-6/policy.xml

- name: Setup Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Setup Bundler
run: gem install bundler -v '~> 1.0'

- name: Checkout dependencies - Base RSpec plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_rspec
path: redmine/plugins/redmine_base_rspec

- name: Prepare Redmine source
working-directory: redmine
run: |
sed -i -e 's/.*puma.*/ gem "puma", "< 6"/' Gemfile
sed -i '/rubocop/d' Gemfile
rm -f .rubocop*
cp plugins/redmine_base_rspec/spec/support/database-${{ matrix.db }}.yml config/database.yml
Expand All @@ -113,19 +115,19 @@ jobs:
bundle exec rails test:scm:setup:subversion

- name: Checkout dependencies - Base Deface plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_deface
path: redmine/plugins/redmine_base_deface

- name: Checkout dependencies - Base StimulusJS plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nanego/redmine_base_stimulusjs
path: redmine/plugins/redmine_base_stimulusjs

- name: Checkout plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: redmine/plugins/${{ env.PLUGIN_NAME }}

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout Redmine
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: redmine/redmine
ref: ${{ env.REDMINE_VERSION }}
Expand Down Expand Up @@ -72,15 +72,16 @@ jobs:
sudo mv policy.xml /etc/ImageMagick-6/policy.xml

- name: Setup Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Setup Bundler
run: gem install bundler -v '~> 1.0'

- name: Checkout dependencies - Base RSpec plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_rspec
path: redmine/plugins/redmine_base_rspec
Expand Down Expand Up @@ -113,19 +114,19 @@ jobs:
bundle exec rails test:scm:setup:subversion

- name: Checkout dependencies - Base Deface plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: jbbarth/redmine_base_deface
path: redmine/plugins/redmine_base_deface

- name: Checkout dependencies - Base StimulusJS plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nanego/redmine_base_stimulusjs
path: redmine/plugins/redmine_base_stimulusjs

- name: Checkout plugin
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: redmine/plugins/${{ env.PLUGIN_NAME }}

Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,27 @@ Here is a complete list of the features:
* Hide optional advanced fields in **version** form
* Define a **default project** selected when creating a new issue without being in a specific project
* Add **check-all / uncheck-all shortcuts** to roles filters
* Improve **roles synthesis** by adding missing informations about issues permissions and trackers
* Improve load time of **users filters** when there are thousands entries
* Improve **roles synthesis** by adding missing data about issues permissions and trackers
* Use or not the select2 plugin
* Improve load time of **users filters** when there are thousands entries and when the select2 plugin is used
* Save **note deletion** in issue journal
* Fix **pasted images** when using Chrome (may be fixed in future Redmine versions according to this issue https://www.redmine.org/issues/36013)
* **Reminders rake task: add max-delay option** to define the maximum number of days after which reminders stop to be sent
* Add **range** custom-field format
* Apply **default value** to existing-issues custom-fields if field is required and not set
* Add **enabled modules** filter and column in projects list
* Add **prevent issue copy** attribute to trackers
* Add new permission to always see **users's email addresses**, bypassing user email_hiding setting

## Test status

|Plugin branch| Redmine Version | Test Status |
|-------------|-------------------|------------------|
|master | 4.2.4 | [![4.2.4][1]][5] |
|master | 4.1.6 | [![4.1.6][2]][5] |
|master | 4.2.9 | [![4.2.9][1]][5] |
|master | 4.1.7 | [![4.1.7][2]][5] |
|master | master | [![master][3]][5]|

[1]: https://github.com/nanego/redmine_tiny_features/actions/workflows/4_2_4.yml/badge.svg
[2]: https://github.com/nanego/redmine_tiny_features/actions/workflows/4_1_6.yml/badge.svg
[1]: https://github.com/nanego/redmine_tiny_features/actions/workflows/4_2_9.yml/badge.svg
[2]: https://github.com/nanego/redmine_tiny_features/actions/workflows/4_1_7.yml/badge.svg
[3]: https://github.com/nanego/redmine_tiny_features/actions/workflows/master.yml/badge.svg
[5]: https://github.com/nanego/redmine_tiny_features/actions
6 changes: 6 additions & 0 deletions app/overrides/context_menus/issues.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Deface::Override.new :virtual_path => 'context_menus/issues',
:name => 'hide-copy-issue-if-tracker-prevents-it',
:insert_bottom => 'erb[loud]:contains("context_menu_link l(:button_copy), project_copy_issue_path(@project, @issue)")',
:text => <<-HIDE_LINK
if !@issue.tracker.prevent_issue_copy
HIDE_LINK
47 changes: 47 additions & 0 deletions app/overrides/issues/_action_menu.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Deface::Override.new :virtual_path => 'issues/_action_menu',
:name => 'hide-copy-issue-if-tracker-prevents-it',
:insert_bottom => 'erb[loud]:contains("link_to l(:button_copy)")',
:text => <<-HIDE_LINK
&& !@issue.tracker.prevent_issue_copy
HIDE_LINK
Deface::Override.new :virtual_path => 'issues/_action_menu',
:name => 'call-renderPartialEdit-before-showAndScrollTo',
:replace => "erb[loud]:contains('l(:button_edit)')",
:text => <<-REPLACE_BUTTON

<% # Put the condition here, not at the beginning of the file, so that we can check the configuration each time we download the page,
# if we put the condition at the beginning of the file it does not execute only once, (start application) %>
<% if Setting.plugin_redmine_tiny_features.key?('do_not_preload_issue_edit_form') %>
<%= link_to l(:button_edit), edit_issue_path(@issue),
:onclick => 'renderPartialEdit(); return false;',
:class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
<script>
var isloaded = false;
function renderPartialEdit(id){
if (!isloaded) {
$.ajax({
url: "<%= render_form_by_ajax_path(@issue.id) %>",
success: function(response) {
$('#update').append(response.html);
showAndScrollTo("update", "issue_notes");
isloaded = true;
$( document ).ready(function() {
// for datepicker element,
<% include_calendar_headers_tags %>
// for wikitoolbar element in mode Textile,
setupFileDrop();
// But for mode visual there is no need to call because it is already called in { $(document).ajaxSuccess/redmine_wysiwyg_editor }
});
},error: function(response) {
console.error(response);
},
});
}
}
</script>
<% else %>
<%= link_to l(:button_edit), edit_issue_path(@issue),
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
:class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
<% end %>
REPLACE_BUTTON
8 changes: 8 additions & 0 deletions app/overrides/issues/_action_menu_edit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Deface::Override.new :virtual_path => 'issues/_action_menu_edit',
:name => 'prevents-render-edit-partial-render-it-only-on-edit-button-click',
:replace => "erb[loud]:contains(\"render :partial => 'edit'\")",
:text => <<-RENDER_PARTIAL
<% if !Setting.plugin_redmine_tiny_features.key?('do_not_preload_issue_edit_form') %>
<%= render :partial => 'edit' %>
<% end %>
RENDER_PARTIAL
13 changes: 9 additions & 4 deletions app/overrides/queries/_filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
:insert_after => "div.add-filter",
:text => <<SELECT2
<script>
// declaration this functions here, in order to generate the path by rails

function useRedminePluginSelect2(){
return <%= Setting.plugin_redmine_tiny_features.key?('use_select2') %>
}

// declaration this function here, in order to generate the path by rails
function updateSelect2ForElements() {
var activePagination = '<%= Setting["plugin_redmine_tiny_features"]["paginate_issue_filters_values"].present?%>';
if (activePagination === 'true'){
var activeSelect2 = useRedminePluginSelect2()
var activePagination = '<%= Setting["plugin_redmine_tiny_features"]["paginate_issue_filters_values"].present? %>';

if (activeSelect2 && activePagination === 'true'){
// check if values_author_id_1 defined
if ($('#values_author_id_1').length > 0) {
setConfigurationForSelect2($('#values_author_id_1'), '<%= author_values_pagination_path %>');
Expand All @@ -27,6 +33,5 @@
}
}
}

</script>
SELECT2
7 changes: 7 additions & 0 deletions app/overrides/trackers/_form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Deface::Override.new :virtual_path => "trackers/_form",
:name => "add-prevent-copy-issues",
:insert_after => "p:eq(2)",
:text => <<-EOS
<p><%= f.check_box :prevent_issue_copy %></p>
EOS

8 changes: 8 additions & 0 deletions app/overrides/users/_preferences.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Deface::Override.new :virtual_path => "users/_preferences",
:name => "add-condition-disable_email_hiding_before_check_box_hide_mail",
:surround => 'p:contains("check_box :hide_mail")',
:text => <<STRING_EMAIL
<% if Setting["plugin_redmine_tiny_features"]["disable_email_hiding"].blank? %>
<%= render_original %>
<% end %>
STRING_EMAIL
6 changes: 6 additions & 0 deletions app/overrides/users/show.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Deface::Override.new :virtual_path => "users/show",
:name => "add-condition-disable_email_hiding",
:replace => "erb[silent]:contains('unless @user.pref.hide_mail')",
:text => <<STRING_EMAIL
<% unless @user.pref.hide_mail && Setting["plugin_redmine_tiny_features"]["disable_email_hiding"].blank? && !User.current.allowed_to?(:always_see_user_email_addresses, nil, :global => true) %>
STRING_EMAIL
14 changes: 14 additions & 0 deletions app/views/custom_fields/formats/_range.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<p>
<label for="custom_field_min_range"><%=l(:label_min_max_range)%></label>
<%= f.text_field :min_value, :size => 5, :no_label => true %> -
<%= f.text_field :max_value, :size => 5, :no_label => true %>
</p>

<p>
<label for="custom_field_steps"><%=l(:label_steps)%></label>
<%= f.text_field :steps, :size => 5, :no_label => true %>
</p>
<p>
<label><%= l(:field_default_value) %></label>
<%= f.text_field :default_value, :size => 5, :no_label => true %>
</p>
2 changes: 0 additions & 2 deletions app/views/issues/_edit_closed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
})
$("#issue-form").on("change", "#issue_status_id", function () {
var status_id = parseInt($(this).val())
console.log(status_id)
console.log($.inArray(status_id, <%= IssueStatus.where(:is_closed => true).pluck(:id).inspect %>))
if ($.inArray(status_id, <%= IssueStatus.where(:is_closed => true).pluck(:id).inspect %>) < 0) {
showIfIssueOpen()
}
Expand Down
Loading