Patch #14318
closedWatchers Alerted To Changes But Cannot See Issues (potentially)
0%
Description
At our company we try to keep things private so user A cannot see tickets from user B. With this in mind, I set the Issues Visibility setting for all user groups to be the assigned to or created by me value. This has the draw back that if I add a watcher because it may not directly implicate that person but they need to be kept in the loop (e.g. supervisor/boss), they would get the email updates but can't see the issue within Redmine itself.
So I added two more options to the Issue Visibility dropdown:
- Created by, Assigned to, or watched by the user
- Created by, Assigned to, watched by, or contributed to by the user
The contributed to just looks at the journals of the issues to see if you've modified the issue in some way (meaning you now have a vested interest in the issue).
Attached is the patch I developed against the core of 2.2.3. I haven't tested it in the 3.x line yet, but hope to soon.
Hopefully this could be wrapped into 2.2.5 or the next 3.x release.
Files
Related issues
Updated by Jan Niggemann (redmine.org team member) over 11 years ago
Good idea, thank you for your patch!
Updated by Brett Patterson over 11 years ago
I've sent this patch in as a pull request to the github repo. The patch above should work on the 2.3.x branch. The only difference are line numbers might be off slightly.
https://github.com/redmine/redmine/pull/15
I know github isn't the official way, but I'm still hopeful this will be integrated.
Updated by Brett Patterson about 11 years ago
callesg tested with 2.4.1-devel and said it works. I'm working on testing it as well.
Updated by Brett Patterson about 11 years ago
I can confirm the patch works with 2.4.1. I manually did the patching, but the same changes do work.
Updated by Brett Patterson over 10 years ago
Jean-Baptiste Barth closed the pull request on GitHub; however, no note here even though I referenced the ticket on GitHub. The patch is attached to the original ticket. Please consider merging this in with the next release.
Updated by Toshi MARUYAMA over 10 years ago
- Related to Defect #17071: Adding Watchers UX Is Not Clean added
Updated by Go MAEDA almost 9 years ago
- Target version set to Candidate for next major release
Wonderful feature. I really want to see this in 3.3 relase.
Updated the patch for Redmine 3.2.0.devel.15058. Works fine for me. All that remains is to add tests.
Updated by Go MAEDA almost 9 years ago
- File roles-edit.png roles-edit.png added
Here is a screenshot.
Updated by Go MAEDA almost 9 years ago
- Related to Feature #16845: Add permission rule to allow watchers can edit issues added
Updated by Go MAEDA almost 9 years ago
- Has duplicate Feature #20106: Adding issue watchers to "Issues Visibility" permissions added
Updated by Go MAEDA almost 9 years ago
- Has duplicate Feature #13828: when users can only see their own issues; give watchers the ability to view issues they watch added
Updated by Hang Xie almost 9 years ago
patch to Redmine 3.2.0, work fine!
it's better than the patch of #8488
Updated by Emrah KAVUN almost 9 years ago
Go MAEDA wrote:
Updated the patch for Redmine 3.2.0.devel.15058. Works fine for me. All that remains is to add tests.
Are we able to get the updated version somewhere?
Thanks
Updated by Go MAEDA almost 9 years ago
- File allow_watchers_and_contributers_access_to_issues_v2.patch allow_watchers_and_contributers_access_to_issues_v2.patch added
Emrah KAVUN wrote:
Go MAEDA wrote:
Updated the patch for Redmine 3.2.0.devel.15058. Works fine for me. All that remains is to add tests.
Are we able to get the updated version somewhere?
Thanks
Sorry, I forgot to attach the file.
Submitting again: allow_watchers_and_contributers_access_to_issues_v2.patch
Updated by Toshi MARUYAMA almost 9 years ago
- Related to Feature #21909: Issues visibility in roles: Issues where user is a watcher added
Updated by Toshi MARUYAMA almost 9 years ago
- Related to deleted (Feature #21909: Issues visibility in roles: Issues where user is a watcher)
Updated by Go MAEDA almost 9 years ago
- Has duplicate Feature #8858: Extend new issue visibility criteria: issues created by or assigned to the user added
Updated by Takenori TAKAKI over 8 years ago
- File allow_watchers_and_contributers_access_to_issues_trunk_r15287.patch allow_watchers_and_contributers_access_to_issues_trunk_r15287.patch added
Go MAEDA wrote:
I have updated the patch for below:Wonderful feature. I really want to see this in 3.3 relase.
Updated the patch for Redmine 3.2.0.devel.15058. Works fine for me. All that remains is to add tests.
- Compatible with latest trunk (r15287)
- Added tests
I also really want to see this in 3.3 relase.
Updated by Fernando Hartmann over 8 years ago
Takenori TAKAKI wrote:
I also really want to see this in 3.3 relase.
+1
Updated by Vedat Kamer over 8 years ago
Fernando Hartmann wrote:
Takenori TAKAKI wrote:
I also really want to see this in 3.3 relase.
+1
+1
Updated by Go MAEDA over 8 years ago
- Target version changed from Candidate for next major release to 3.3.0
Takenori TAKAKI wrote:
I have updated the patch for below:
- Compatible with latest trunk (r15287)
- Added tests
Thanks for adding tests!
The patch works fine and passed all tests. I think we can merge this patch. Setting target version to 3.3.0.
Updated by Fabrizio Sebastiani over 8 years ago
- File allow_watchers_and_contributers_access_to_issues_3.2.0.patch allow_watchers_and_contributers_access_to_issues_3.2.0.patch added
I tested right now a patch derived from Takenori TAKAKI's one allow_watchers_and_contributers_access_to_issues_trunk_r15287.patch
but since i have a 2.3.0 stable, I have arranged it and I provide it here as allow_watchers_and_contributers_access_to_issues_3.2.0.patch it have some little differences.
apply it with -p1 to avoid errors:
# cd /my/redmine/root/dir/2.3.0-stable # ls -d vendor app extra lib bin config README.rdoc app bin config extra lib README.rdoc vendor # patch -p1 < /somewhere/allow_watchers_and_contributers_access_to_issues_3.2.0.patch
I didn't run test functions, sorry.
Thank you for this patch and candidate for next release. We are getting a good experience with redmine as a new tool in company: this functionality is absolutely important for us.
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from New to Closed
- Target version deleted (
3.3.0)
This is the same as #8488. Using watchers as a way to give access to issues was already discussed, please see #7412#note-13.
Updated by Jean-Philippe Lang over 8 years ago
- Related to deleted (Feature #16845: Add permission rule to allow watchers can edit issues)
Updated by Jean-Philippe Lang over 8 years ago
- Has duplicate deleted (Feature #13828: when users can only see their own issues; give watchers the ability to view issues they watch)
Updated by Jean-Philippe Lang over 8 years ago
- Has duplicate deleted (Feature #20106: Adding issue watchers to "Issues Visibility" permissions)
Updated by Jean-Philippe Lang over 8 years ago
- Has duplicate deleted (Feature #8858: Extend new issue visibility criteria: issues created by or assigned to the user)
Updated by Jean-Philippe Lang over 8 years ago
- Related to deleted (Defect #17071: Adding Watchers UX Is Not Clean)
Updated by Jean-Philippe Lang over 8 years ago
- Related to Feature #8488: Create an 'Involve' mechanism to private issues added
Updated by Jean-Philippe Lang over 8 years ago
- Related to deleted (Feature #8488: Create an 'Involve' mechanism to private issues)
Updated by Jean-Philippe Lang over 8 years ago
- Is duplicate of Feature #8488: Create an 'Involve' mechanism to private issues added
Updated by Tobias Fischer over 8 years ago
There's ongoing discussion in #8488.
But for those landing here in this ticket I can confirm allow_watchers_and_contributers_access_to_issues_3.2.0.patch
works well for 3.2.3.stable.15464
Updated by Jan from Planio www.plan.io over 8 years ago
- Related to Patch #23546: Issue visibility "watched by, created by or assigned to" for roles added
Updated by Peter Brogren almost 8 years ago
We agree that this is functionality that should get merged in, as soon as possible. On the subject of confusing, we believe it is very confusing for someone to get the notification as a watcher but then not be able to log in and see the issue. We do use a modified patch of this and frequently use the method of adding someone as a watcher as a way to allow ("invite") someone to see what happens with a certain private (secret!) issue, i.e. get the email notifications AND be able to log in and see the issue. If such person then decides to "unwatch" the issue, it seems OK with everyone that you no longer get the emails AND are no longer able to see the issue. After all you decided to "unwatch" the issue, i.e. you specifically said you don't want to see (watch) it anymore! Please merge at the earliest convenience!
Updated by Tobias Fischer over 7 years ago
- File allow_watchers_and_contributers_access_to_issues_3.3.0.patch allow_watchers_and_contributers_access_to_issues_3.3.0.patch added
The attached patch is an updated version of allow_watchers_and_contributers_access_to_issues_3.2.0.patch
which works for 3.3.x
Needs to be run from redmine install root dir.
Updated by Tobias Fischer over 7 years ago
- File allow_watchers_and_contributers_access_to_issues_3.4.2.patch allow_watchers_and_contributers_access_to_issues_3.4.2.patch added
And this patch was made against Redmine 3.4.2 and I can confirm it works.
Updated by Lara R almost 7 years ago
Tobias Fischer wrote:
And this patch was made against Redmine 3.4.2 and I can confirm it works.
And in which directory did you install it? I am unable to install it.
I got this error:
can't find file to patch at input line 4_ Perhaps you used the wrong -p or --strip option? The text leading up to this was:
|*** diff -Naur app/models/issue.rb ----- File to patch: –
Updated by Tobias Fischer almost 7 years ago
I'm not sure, this has been a while.
But visiting my .bash_history
file showed me this:
cp 14318-allow_watchers_and_contributers_access_to_issues_3.4.2.patch redmine-3.4/ cd redmine-3.4/ patch -p0 --dry-run < 14318-allow_watchers_and_contributers_access_to_issues_3.4.2.patch patch -p0 < 14318-allow_watchers_and_contributers_access_to_issues_3.4.2.patch
So looks like I installed it from the redmine root directory and first tried it with a dry-run.
Updated by Lara R over 6 years ago
Tobias Fischer wrote:
I'm not sure, this has been a while.
But visiting my.bash_history
file showed me this:[...]
So looks like I installed it from the redmine root directory and first tried it with a dry-run.
I tried with those commands but still getting the same error.
Any ideas?
Updated by Mitchell Fang over 6 years ago
+1 Thanks! able to use the 3.4.2 patch on 3.4.4.stable.17206
thanks a bunch
imane seddiki R
Are you sure you are at the root redmine directory? that depends on where redmine was installed.
Updated by froot wang over 6 years ago
+1 Thanks! able to use the 3.4.2 patch on 3.4.6
if use bitnami redmine,should cd htdoc then use patch -p0 cmd.
Updated by Ivan Kotelnikov over 6 years ago
Redmine version 3.4.6
patch -p0 did not work
I have added all changes manually
it works!
Thanks!
Updated by Eric Feyzullov over 6 years ago
3.4.2 patch nice work on 3.4.6. thank you so much
root@66300:/var/www/redmine# patch -p0 < allow_watchers_and_contributers_access_to_issues_3.4.2.diff
patching file app/models/issue.rb
Hunk #1 succeeded at 130 (offset -2 lines).
Hunk #2 succeeded at 165 (offset -2 lines).
patching file app/models/role.rb
patching file config/locales/en.yml
patching file test/unit/issue_test.rb
Updated by Kicking Alderman almost 6 years ago
- File allow_watchers_and_contributers_access_to_issues_4.0.0.patch allow_watchers_and_contributers_access_to_issues_4.0.0.patch added
- File watchers.png watchers.png added
Awesome work!
Testing Redmine 4.0 right now, and this patch is something we could really use.
The patch worked, but with a couple of minor changes.
First, in the issue.rb
file user.groups.map(&:id)
should be user.groups.pluck(:id)
.
Second, there are a couple of line number mismatches, but that can be easily fixed using fuzz:
superuser@redmineserver:/srv/git/redmine$ patch -p0 -F3 < allow_watchers_and_contributers_access_to_issues_4.0.0.patch patching file app/models/issue.rb Hunk #1 succeeded at 129 (offset -3 lines). Hunk #2 succeeded at 164 (offset -3 lines). patching file app/models/role.rb patching file config/locales/en.yml Hunk #1 succeeded at 462 with fuzz 3. Hunk #2 succeeded at 1020 with fuzz 3. patching file test/unit/issue_test.rb
Updated by Jacq Jacq almost 6 years ago
- File allow_watchers_and_contributers_access_to_issues_4.0.2.patch allow_watchers_and_contributers_access_to_issues_4.0.2.patch added
Testing in Redmine 4.0.2, attached line number mismatches.
Updated by SOE Redmine over 5 years ago
Hi!
Do you have any updated information about the patch in 4.0.2? I would like to install it and try.
Is this the right way i can install it?: patch -p0 -F3 < filename?
Can I uninstall this patch if i needed?
Does this patch effect the further redmine upgrade process?
Do you find any bug related to this patch?
Thanks,
Updated by Taner Tas over 5 years ago
Can we extend this patch for private projects too?
This patch seems work only on public projects.
Updated by Luciano Fantuzzi over 5 years ago
+1 to Taner request. All our projects structure is private and this patch works but only applies to public projects. Any chance someone can tell how to make it work also for private projects?
Thank you.
Updated by Eric Feyzullov about 5 years ago
working well with manually add on 4.0.4.stable.18380
thank you
Updated by Jacq Jacq almost 5 years ago
- File allow_watchers_and_contributers_access_to_issues_4.1.0.patch allow_watchers_and_contributers_access_to_issues_4.1.0.patch added
Testing in Redmine 4.1.0, attached line number mismatches.
Updated by Jonathan Griffon almost 5 years ago
- File allow_watchers_and_contributers_access_to_issues_4.1.0.patch allow_watchers_and_contributers_access_to_issues_4.1.0.patch added
Jacq Jacq wrote:
Testing in Redmine 4.1.0, attached line number mismatches.
this one is working for 4.1.0
Updated by Aleksandar Pavic over 4 years ago
This should be part of core functionality...
+1
Updated by Jej Jerome over 4 years ago
I have issue with it on 4.1.1Users have 403 error on all issues.
They see issue in issue list, but when they click on it, it's forbidden.
My patch didn't applied correctly. I manually add missing lines and it works well in 4.1.1
Updated by Frederico Camara over 3 years ago
- File 0001-Fix-query-error-where-no-issue_ids-are-watched-or-fo.patch 0001-Fix-query-error-where-no-issue_ids-are-watched-or-fo.patch added
Postgres returns an error:
ActiveRecord::StatementInvalid (PG::SyntaxError: ERROR: syntax error at or near ")" LINE 1: ...es.assigned_to_id IN (10,111) OR issues.id IN ()))) OR (p...
It seems it does not accept the empty list "issues.id IN ()".
I added some code to fix it, here's the patch. To be applied over your patch:
git -am 0001-Fix-query-error-where-no-issue_ids-are-watched-or-fo.patch
Updated by Jobin Joseph over 3 years ago
- File allow_watchers_and_contributers_access_to_issues_4.2.2.patch allow_watchers_and_contributers_access_to_issues_4.2.2.patch added
Here is the patch for Redmine 4.2.2
Apply with the below commands.
cd redmine patch -p1 < allow_watchers_and_contributers_access_to_issues_4.2.2.patch
Updated by Jonathan Griffon about 3 years ago
due to Patch #3329 and new Feature #4511, list of users in Add watcher button does not list potential watchers.
Patch need to check if Issues Visibility is defined as "watched by the user" in all user list
It's only for version 4.2.x
I think problem is under app/models/principal.rb
with a new class assignable_watchers
which is filtering users but I don't understand how.
I'm sure this is this class because of change in app/controlers/watchers_controller.rb
in function users_for_new_watcher
old versions list users with @project.users
and now it's with @project.principals.assignable_watchers
I worked around the problem by resetting the call to the list of all users in watchers_controller.rb but the groups functionality no longer works (see my patch in attached file)
Updated by Rolf Wojtech about 3 years ago
I can confirm Jonathan's issue with the 4.2.2 patch. I have not tried his workaround yet.
Maybe it is time to migrate away from the somewhat dirty patching towards this plugin:
https://github.com/maxrossello/redmine_extended_watchers
(found in #8488)
Has anyone done this step already and experiences to share here?
Updated by Jonathan Griffon about 3 years ago
Rolf Wojtech wrote:
I can confirm Jonathan's issue with the 4.2.2 patch. I have not tried his workaround yet.
Maybe it is time to migrate away from the somewhat dirty patching towards this plugin:
https://github.com/maxrossello/redmine_extended_watchers
(found in #8488)Has anyone done this step already and experiences to share here?
I tried this plugin and it work well
Thank you
Updated by Aleksandar Pavic over 2 years ago
Go MAEDA wrote:
Here is a screenshot.
+1
This ticket should not be closed...
This should be implemented in core.
Updated by Sofie vdm almost 2 years ago
Aleksandar Pavic wrote:
This ticket should not be closed...
This should be implemented in core.
+1
Updated by Gal Ito about 1 year ago
Hello. Would it be possible to have a fully compatible release for Redmine 5.1.1 please ?
Updated by Rasko R about 1 year ago
Hello guys.
Could you add this feature for latest Redmine 5 version please?
Thanks in advance.
Updated by Stefan Mueller about 2 months ago
Hello,
I agree with the previous user.
We also need this behavior or plugin.
Would it be possible to integrate this into Redmine?
Is this plugin compatible with 5.x?
Thanks in advance.