Vote #80227
完了Per role visibility settings for spent time custom fields
0%
説明
Based on the work made by Jens Krämer in #23997, I've created a patch that adds role visibility settings for spent time custom fields (including two tests).
journals
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Tests pass: https://gitlab.com/redmine-org/redmine/pipelines/74831334
--------------------------------------------------------------------------------
Hello Marius,
amazing job, thanks so much! I'd like to test your patch in our env.
Could you please advise me how to apply the patch?
What are the proper commands and order please?
What are the compatible versions of redmine, where can be patch applied?
How the redmine installation/database will be affected when patched redmine will be updated? ...and patched again then? Wil be any data/permission settings lost?
Is it safe to apply this on our productiton redmine? -)
thank you!
Kind regards
J.
--------------------------------------------------------------------------------
Jenda Benda wrote:
> Hello Marius,
>
> amazing job, thanks so much! I'd like to test your patch in our env.
>
> Could you please advise me how to apply the patch?
> What are the proper commands and order please?
> What are the compatible versions of redmine, where can be patch applied?
> How the redmine installation/database will be affected when patched redmine will be updated? ...and patched again then? Wil be any data/permission settings lost?
> Is it safe to apply this on our productiton redmine? -)
>
> thank you!
> Kind regards
> J.
Hello Jenda,
The patch doesn't add any migration of the database, so it should be quite safe to apply it in your environment, especially if you make the tests on new spent time custom fields or you set back the visibility to any role after your tests, but I do not recommend to apply it if you don't have experience with patches and/or Redmine. Unfortunately, I cannot offer you assistance for your environment, maybe you can request help on the forum.
I'm confident that we will deliver this feature in version:"4.1.0" or version:"4.2.0".
--------------------------------------------------------------------------------
Commited the patch. Thank you for this nice improvement.
--------------------------------------------------------------------------------
The changes committed (some line breaks) to @app/models/issue_query.rb@ were intended?
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> The changes committed (some line breaks) to @app/models/issue_query.rb@ were intended?
Maybe I mistakenly updated issue_query.rb while fixing Rubocop's Layout/MultilineBlockLayout warning. Since I saw some Rubocop warnings after applying the patch, I ran @rubocop --auto-correct@.
--------------------------------------------------------------------------------
The patch changed also the location where @<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>@ is rendered.
Before this patch, the hook was rendered inside the first tabular box:
!box.png!
but after this patch, the hook is rendered outside the box.
In order to restore the previous behaviour, I see 2 options:
1. Add the hook for each type of custom field (attachment:restore_hook.diff)
2. Refactor the custom fields form view (attachment:0001-Refactor-custom-fields-form.patch)
Attached both patches. I'm in favour of the second solution and also I think we should add a new hook in the page in order to allow plugins to render outside the box (for example: to use the new partial views (role, tracker, projects).
--------------------------------------------------------------------------------
Hi There,
thanks a lot once again for all the work here...
I was just about to try to apply the patch in our prod redmine and found this new comment, which I'm afraid do not understand fully.
Does that mean I should wait with the patching? Or is it still safe to apply? Is it necessary/recommended to apply additional patch from Marius as well please?
thanks a lot
kind regards
j.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> In order to restore the previous behaviour, I see 2 options:
> 1. Add the hook for each type of custom field (attachment:restore_hook.diff)
> 2. Refactor the custom fields form view (attachment:0001-Refactor-custom-fields-form.patch)
>
> Attached both patches. I'm in favour of the second solution and also I think we should add a new hook in the page in order to allow plugins to render outside the box (for example: to use the new partial views (role, tracker, projects).
Committed the second patch in r18376. Thanks.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Hello #Go MAEDA is the plug-in useful for Redmine 3.4.13 too? I cannot find GIT repo for this patch. Thank you
--------------------------------------------------------------------------------
It seems this feature has a defect as described in #33550 where the new setting is ignored.
--------------------------------------------------------------------------------
related_issues
relates,Closed,23997,Per role visibility settings for version custom fields
relates,Closed,31999,Add missing fixtures to TimelogCustomFieldsVisibilityTest
duplicates,Closed,25746,Spent time - CUSTOM fields - permissions