return1 / redmine_hide_estimated_hours Goto Github PK
View Code? Open in Web Editor NEWHide estimated hours from Redmine
Hide estimated hours from Redmine
changed
requires_redmine :version => '5.0.2'
in
requires_redmine :version => '5.1'
Thanks!
Hi,
thank you very much for your awesome plugin!
I just wanted to ask, if there is any chance to get the rendereing time of your plugin down.
At the moment it looks like this:
Rendered plugins/redmine_hide_estimated_hours/app/views/issues/index.html.erb within layouts/base (1394.1ms)
Rendered plugins/redmine_hide_estimated_hours/app/views/issues/_attributes.html.erb (140.7ms)
So these two processes take 2/3 of the whole loading time.
Therefor it would be nice to get that down.
We are working on this redmine instance:
Environment:
Redmine version 4.0.4.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux]
Rails version 5.2.3
redmine_hide_estimated_hours 1.0.9
Thank you very much!
oot@darkstar:/var/www/redmine# !rak
rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
uninitialized constant RedmineHudson
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:594:in _run__224806129447008142__prepare__226485405474289723__callbacks' /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:405:in
__run_callback'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:385:in _run_prepare_callbacks' /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:81:in
run_callbacks'
/var/lib/gems/1.9.1/gems/actionpack-3.2.17/lib/action_dispatch/middleware/reloader.rb:74:in prepare!' /var/lib/gems/1.9.1/gems/actionpack-3.2.17/lib/action_dispatch/middleware/reloader.rb:48:in
prepare!'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application/finisher.rb:47:in block in <module:Finisher>' /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in
instance_exec'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in run' /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:55:in
block in run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in each' /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in
run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:136:in initialize!' /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in
method_missing'
/var/lib/gems/1.9.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in require' /var/lib/gems/1.9.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in
require'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:103:in require_environment!' /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:305:in
block (2 levels) in initialize_ta
I have a role named 'client'. After applying the plugin, estimated time is missing everywhere but the single issue view.
RM information:
Redmine version 2.5.1.stable
Ruby version 1.8.7-p352 (2011-06-30) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter Mysql2
SCM:
Filesystem
Redmine plugins:
redmine_agile 1.1.2-light
redmine_hide_estimated_hours 1.0.6
redmine_tags 2.1.0
The readme mentions that the solution for issues journals is not optimal, but that at least the old and new values are stripped from the output. I'm finding that the old and new values are both exposed when accessing a URL like the http://MySiteHere/issues/87.xml?include=journals while logged in as a user that is assigned to a role that does not have the "View Time Entries" permission.
My environment is as follows.
Component | Value |
---|---|
Redmine version | 2.3.1.devel |
Ruby version | 1.8.7 (amd64-freebsd9) |
Rails version | 3.2.13 |
Database adapter | PostgreSQL |
Thanks in advance for your help with this, and thank you for the plug-in!
Plugin seems broken in Redmine 3.4.
When I call /issues:
[2017-07-18 17:27:52.516 +0300] (31069) INFO index.html.erb:106:in `block in _plugins_redmine_hide_estimated_hours_app_views_issues_index_html_erb__3632354224006244890_32259320' Rendered issues/_sidebar.html.erb (12.0ms)
[2017-07-18 17:27:52.519 +0300] (31069) INFO issues_controller.rb:51:in `block (2 levels) in index' Rendered plugins/redmine_hide_estimated_hours/app/views/issues/index.html.erb within layouts/base (121.2ms)
[2017-07-18 17:27:52.520 +0300] (31069) INFO Completed 500 Internal Server Error in 311ms (ActiveRecord: 94.7ms)
[2017-07-18 17:27:52.522 +0300] (31069) FATAL
ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
118: :title => l(:label_changes_details)) %>
119: <% end %>
120:
121: <%= context_menu issues_context_menu_path %>
app/helpers/application_helper.rb:1300:in `context_menu'
plugins/redmine_hide_estimated_hours/app/views/issues/index.html.erb:121:in `_plugins_redmine_hide_estimated_hours_app_views_issues_index_html_erb__3632354224006244890_32259320'
app/controllers/issues_controller.rb:51:in `block (2 levels) in index'
app/controllers/issues_controller.rb:46:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Perhaps it would be right to create branches:
redmine-1.4.x
on commit 0ada15ec9d4d965f18fe78f3dbdb6ffc8d1522f3
redmine-1.3.x
on commit 0a1bf083a6026ed5e81c85efa768f10e4cf16a79
This versions listed in changelog here: http://www.redmine.org/plugins/redmine_hide_estimated_hours
P.S. Works good with 1.4.x. Thank you!
Hi,
When we use this plugin in combination with others (agile / agile backlog) which also uses estimated hours then the user that doesn't have the role 'view spent time' still sees the spent time.
Creation of a task, which is a default redmine function, is not affected.
Started GET "/issues/15651" for 127.0.0.1 at 2014-10-27 14:01:49 +0200
Processing by IssuesController#show as HTML
Parameters: {"id"=>"15651"}
Current user: ppo (id=95)
Rendered issues/_action_menu.html.erb (5.9ms)
Rendered plugins/redmine_hide_estimated_hours/app/views/issues/show.html.erb within layouts/base (47.6ms)
Completed 500 Internal Server Error in 239.9ms
ActionView::Template::Error (undefined method `project_issue_time_entries_path' for #<#<Class:0xabf9f14>:0xaf5bdd8>):
63: end
64: end
65: if User.current.allowed_to?(:view_time_entries, @project)
66: rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), project_issue_time_entries_path(@project, @issue)) : "-"), :class => 'spent-time'
67: end
68: end %>
69: <%= render_custom_fields_rows(@issue) %>
app/helpers/issues_helper.rb:158:in `issue_fields_rows'
app/controllers/issues_controller.rb:128:in `block (2 levels) in show'
app/controllers/issues_controller.rb:125:in `show'
Environment:
Redmine version 2.6.0.stable.13520
Ruby version 1.9.3-p327 (2012-11-10) [i686-linux]
Rails version 3.2.19
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.7.1
Filesystem
Redmine plugins:
multi_time_tracker 0.1.4
projects_table 0.0.4
redmine_agile 1.3.2
redmine_dmsf 1.4.9 stable
redmine_drafts 0.2.0
redmine_equipment_status_viewer 1.0.1
redmine_fields_permissions 1.0.0
redmine_hide_estimated_hours 1.0.6
redmine_lightbox 0.0.1
redmine_monitoring_controlling 0.1.1
redmine_plugin_views_revisions 0.0.1
redmine_ppo 0.0.1
redmine_timesheet_plugin 0.7.0
redmine_xls_export 0.2.1.t4
reklama 0.2.1
Hi I installed the plugin but it does not shows up in my plugin overview.
Neither are the enhanced permissions visible..
Can you provide us a short "Usage Guide"?
Doesn't work with redmine 4.0.3 and rails 5.2:
$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
NoMethodError: undefined method `alias_method_chain' for Journal (call 'Journal.connection' to establish a connection):Class
Did you mean? alias_method
/var/lib/gems/2.3.0/gems/activerecord-5.2.2.1/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/var/www/redmine-4/plugins/redmine_hide_estimated_hours/lib/journal_patch.rb:7:in `included'
/var/www/redmine-4/plugins/redmine_hide_estimated_hours/lib/journal_patch.rb:35:in `include'
/var/www/redmine-4/plugins/redmine_hide_estimated_hours/lib/journal_patch.rb:35:in `<top (required)>'
I've replaced alias_method_chain
with alias_method
.
And it looks like it works.
I'm not sure that this is correct patch. I don't understand ruby well. Based on rails documentation.
Full diff:
diff --git a/lib/journal_patch.rb b/lib/journal_patch.rb
index 0e4f415..b1ce2eb 100644
--- a/lib/journal_patch.rb
+++ b/lib/journal_patch.rb
@@ -6,7 +6,8 @@ module JournalPatch
base.send(:include, InstanceMethods)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
- alias_method_chain :visible_details, :patch
+ alias_method :visible_details_without_patch, :visible_details
+ alias_method :visible_details, :visible_details_with_patch
end
end
@@ -32,4 +33,4 @@ module JournalPatch
end
end
-Journal.send(:include, JournalPatch)
\ No newline at end of file
+Journal.send(:include, JournalPatch)
diff --git a/lib/pdf_patch.rb b/lib/pdf_patch.rb
index d6b3050..d521815 100644
--- a/lib/pdf_patch.rb
+++ b/lib/pdf_patch.rb
@@ -7,7 +7,8 @@ module IssuesPdfHelperPatch
base.send(:include, InstanceMethods)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
- alias_method_chain :issue_to_pdf, :patch
+ alias_method :issue_to_pdf_without_patch, :issue_to_pdf
+ alias_method :issue_to_pdf, :issue_to_pdf_with_patch
end
end
diff --git a/lib/query_patch.rb b/lib/query_patch.rb
index b939625..ac1e567 100644
--- a/lib/query_patch.rb
+++ b/lib/query_patch.rb
@@ -6,7 +6,8 @@ module QueryPatch
base.send(:include, InstanceMethods)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
- alias_method_chain :available_filters, :patch
+ alias_method :available_filters_without_patch, :available_filters
+ alias_method :available_filters, :available_filters_with_patch
end
end
@@ -28,7 +29,8 @@ module IssueQueryPatch
base.send(:include, InstanceMethods)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
- alias_method_chain :available_columns, :patch
+ alias_method :available_columns_without_patch, :available_columns
+ alias_method :available_columns, :available_columns_with_patch
end
end
Hi, I'm wondering if there's any solution for using this plugin, but with the View spent time leaving checked. The problem is that if I uncheck it, the users are not able to see even their own time logs on a certain project/issue, which caused confusion. So in this way we're adding a new feature for managers, while reducing usability for developers.
Hi,
I don't know if the cause of this issue is with redmine_hide_estimated_hours or redmine_x_ux_upgrade but when we use both plugins some weird layout issues occur.
Redmine 5.0.5 without any modules installed
Glad to hear your input on this issue.
Kind Regards.
If installed the plugin on Redmine 3.1.1.stable. The save issue query link is not working because it still calls the submit_query_form
js function, which is removed as of version 3.0.0.
Changing the issues/index.html.erb template like this, fixes the problem
@@ -48,7 +48,7 @@
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
<%= link_to_function l(:button_save),
- "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }'); submit_query_form('query_form')",
+ "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
:class => 'icon icon-save' %>
<% end %>
</p>
The plugin works great everywhere except when I try to view/edit the issues there's 404 error on the page of the issue.
ex.: https://myredminedomain.com/issue/issuenumber -> return 404
The error is thrown with every user/role, also administrator.
Downloaded from master.
I, [2020-03-24T14:56:17.260943 #1] INFO -- : Completed 200 OK in 197ms (Views: 113.1ms | ActiveRecord: 43.1ms)
I, [2020-03-24T14:56:20.393200 #1] INFO -- : Started GET "/issues/835" for 172.19.0.1 at 2020-03-24 14:56:20 +0000
I, [2020-03-24T14:56:20.394472 #1] INFO -- : Processing by IssuesController#show as HTML
I, [2020-03-24T14:56:20.394547 #1] INFO -- : Parameters: {"id"=>"835"}
I, [2020-03-24T14:56:20.402390 #1] INFO -- : Current user: xxxx (id=6)
I, [2020-03-24T14:56:20.512864 #1] INFO -- : Rendering plugins/redmine_hide_estimated_hours/app/views/issues/show.html.erb within layouts/base
I, [2020-03-24T14:56:20.519348 #1] INFO -- : Rendered issues/_action_menu.html.erb (6.1ms)
I, [2020-03-24T14:56:20.575837 #1] INFO -- : Rendered plugins/redmine_agile/app/views/issues/_issue_story_points.html.erb (6.6ms)
I, [2020-03-24T14:56:20.576018 #1] INFO -- : Rendered plugins/redmine_agile/app/views/issues/_agile_data_labels.html.erb (6.9ms)
I, [2020-03-24T14:56:20.586220 #1] INFO -- : Rendered plugins/redmine_checklists/app/views/issues/_checklist.html.erb (3.5ms)
I, [2020-03-24T14:56:20.627619 #1] INFO -- : Rendered issue_relations/_form.html.erb (5.5ms)
I, [2020-03-24T14:56:20.629759 #1] INFO -- : Rendered issues/_relations.html.erb (40.1ms)
I, [2020-03-24T14:56:20.633299 #1] INFO -- : Rendered plugins/redmine_hide_estimated_hours/app/views/issues/show.html.erb within layouts/base (118.7ms)
W, [2020-03-24T14:56:20.633517 #1] WARN -- : Missing template, responding with 404: Missing partial issues/_history, application/_history with {:locale=>[:it, :en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rsb]}. Searched in:
"/usr/src/redmine/plugins/redmine_hide_estimated_hours/app/views"
"/usr/src/redmine/plugins/redmine_checklists/app/views"
"/usr/src/redmine/plugins/redmine_agile/app/views"
"/usr/src/redmine/plugins/plus_gantt/app/views"
"/usr/src/redmine/plugins/easy_wbs/app/views"
"/usr/src/redmine/plugins/easy_mindmup/app/views"
"/usr/src/redmine/plugins/easy_gantt/app/views"
"/usr/src/redmine/app/views"
"/usr/local/bundle/gems/redmine_extensions-0.3.11/app/views"
"/usr/local/bundle/gems/redmine_crm-0.0.52/app/views"
I, [2020-03-24T14:56:20.634457 #1] INFO -- : Rendering common/error.html.erb within layouts/base
I, [2020-03-24T14:56:20.634746 #1] INFO -- : Rendered common/error.html.erb within layouts/base (0.2ms)
I, [2020-03-24T14:56:20.697935 #1] INFO -- : Completed 404 Not Found in 303ms (Views: 55.9ms | ActiveRecord: 53.9ms)
Thanks!
Good evening!
Thanks for useful plugin. It works fine with one small exception.
Users who has not permission to 'View spent time' now (after install of your plugin) can't see 'Estimated time' in issue view (an so on). But in the email notifications about changes in such issues they are recieving now lines like 'parameter Estimated time xx.xx is deleted'. E.g., previous value ('xx.xx') of this parameter is not hidden by plugin. :-(
Can you help me to fix this? I thing, in this context, lines about 'Estimated hours' can't be present in email notifications at all.
I've installed the plugin and due_date and start_date fields in issue edit form lost it's date pickers and started to behave like plain text inputs.
The source HTML looks:
`<input size="10" type="text" value="2018-12-20" name="issue[due_date]" id="issue_due_date" class="date">
so it really looks like an text input.
After simple patch the fields work as expected:
`--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -48,14 +48,14 @@
<% if @issue.safe_attribute? 'start_date' %>
- <%= f.text_field(:start_date, :size => 10, :required => @issue.required_attribute?('start_date')) %> + <%= f.date_field(:start_date, :size => 10, :required => @issue.required_attribute?('start_date')) %> <%= calendar_for('issue_start_date') if @issue.leaf? %>
<% end %><% if @issue.safe_attribute? 'due_date' %>
- <%= f.text_field(:due_date, :size => 10, :required => @issue.required_attribute?('due_date')) %> + <%= f.date_field(:due_date, :size => 10, :required => @issue.required_attribute?('due_date')) %> <%= calendar_for('issue_due_date') if @issue.leaf? %>
<% end %> `Started GET "/issues/13414.pdf" for 1.1.1.1 at 2014-03-06 15:11:11 +0100
Processing by IssuesController#show as PDF
Parameters: {"id"=>"13414"}
Current user: eo (id=122)
Completed 500 Internal Server Error in 174.0ms
NameError (uninitialized constant PDFPatch::InstanceMethods::ITCPDF):
app/controllers/issues_controller.rb:129:in `block (2 levels) in show'
app/controllers/issues_controller.rb:121:in `show'
[root@rmarch rm2.4.0]# grep -ri "PDFPatch" .
./plugins/redmine_hide_estimated_hours/lib/pdf_patch.rb:module PDFPatch
./plugins/redmine_hide_estimated_hours/lib/pdf_patch.rb:Redmine::Export::PDF.send(:include, PDFPatch)
./log/production.log:NameError (uninitialized constant PDFPatch::InstanceMethods::ITCPDF):
When I try to print a redmine ticket as pdf I get an Internal error.
In the redmine log I find:
Started GET "/issues/2949.pdf" for IP at 2017-04-13 18:50:22 +0200
Processing by IssuesController#show as PDF
Parameters: {"id"=>"2949"}
Current user: some_user (id=5)
Rendered issues/show.pdf.erb (1590.5ms)
Completed 500 Internal Server Error in 1631ms (ActiveRecord: 4.0ms)
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: <%= raw issue_to_pdf(@issue, :journals => @journals) %>
lib/redmine/export/pdf.rb:95:in `RDMwriteFormattedCell'
plugins/redmine_hide_estimated_hours/lib/pdf_patch.rb:211:in `block in issue_to_pdf_with_patch'
plugins/redmine_hide_estimated_hours/lib/pdf_patch.rb:192:in `each'
plugins/redmine_hide_estimated_hours/lib/pdf_patch.rb:192:in `issue_to_pdf_with_patch'
app/views/issues/show.pdf.erb:1:in `_app_views_issues_show_pdf_erb___3347497807862764003_70196387368240'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in `call'
As far as I can tell, this issue is due to your plugin.
I am running the latest version of your plugin that I pulled from github commit version 991dd89.
Could you look into this error and fix it.
My redmine version
Environment:
Redmine version 3.2.3.stable
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux]
Rails version 4.2.5.2
Environment production
Database adapter Mysql2
Please let me know if I can provide further information to help fixing the issue.
hi after install on redmine 3.3 we have this error, can you help me?
ActionView::Template::Error (undefined method project_issue_form_path' for #<#<Class:0x00000007af8668>:0x007f2c92781340>): 4: <div class="splitcontentleft"> 5: <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> 6: <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, 7: :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> 8: 9: <% else %> 10: <p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p> plugins/redmine_hide_estimated_hours/app/views/issues/_attributes.html.erb:7:in
block in _plugins_redmine_hide_estimated_hours_app_views_issues__attributes_html_erb___3751078550790660715_69914706333140'
app/helpers/application_helper.rb:1058:in labelled_fields_for' plugins/redmine_hide_estimated_hours/app/views/issues/_attributes.html.erb:1:in
_plugins_redmine_hide_estimated_hours_app_views_issues__attributes_html_erb___3751078550790660715_69914706333140'
app/views/issues/_form.html.erb:42:in block in _app_views_issues__form_html_erb___1767942668988508952_69914703937680' app/helpers/application_helper.rb:1058:in
labelled_fields_for'
app/views/issues/_form.html.erb:1:in _app_views_issues__form_html_erb___1767942668988508952_69914703937680' app/views/issues/_edit.html.erb:8:in
block in _app_views_issues__edit_html_erb___3818692136020643424_69914703759500'
app/helpers/application_helper.rb:1051:in labelled_form_for' app/views/issues/_edit.html.erb:1:in
_app_views_issues__edit_html_erb___3818692136020643424_69914703759500'
plugins/redmine_hide_estimated_hours/app/views/issues/show.html.erb:134:in _plugins_redmine_hide_estimated_hours_app_views_issues_show_html_erb___3221961296161282391_69914706345840' app/controllers/issues_controller.rb:122:in
block (2 levels) in show'
app/controllers/issues_controller.rb:119:in show' lib/redmine/sudo_mode.rb:63:in
sudo_mode'
When you update an estimate the history of an issue displays: Estimated time deleted (x.xx) which shows the number of hours that used to be in the estimated time field to the users without permission to see the estimates.
Is there a way to hide this value for users without rights to view estimates?
changes to the "estimated hours"-field are still visible in emails.
Environment:
Redmine version 2.6.1.stable
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 3.2.21
Plugin:
redmine_hide_estimated_hours 1.0.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.