Project

General

Profile

Actions

Defect #31748

closed

Workflow can't prevent users to create new issue for specific tracker

Added by Taine Woo over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues workflow
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

TrackerA, default status: New.
RoleA: AddIssue enabled.
Workflow for RoleA and TrackerA: disable all status from the first line: "New issue".

UserA has only RoleA's permission in ProjectA.
Try to New Issue, as TrackerA.

Expected Result: since all status are disabled for this role and this tracker, there should be no status available for this user. So we can prevent this user to create new issue for TrackerA.

Actual Result: The default status of TrackerA set by tracker settings, will be available when this user try to create new issue.

This issue fails on both 4.0.2 and 4.0.3

Environment:
Redmine version 4.0.2.stable
Ruby version 2.6.2-p47 (2019-03-13) [x86_64-linux-gnu]
Rails version 5.2.2
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.9.7
Cvs 1.12.13
Git 2.17.1
Filesystem
GitRemote 2.17.1

Actions #1

Updated by Taine Woo over 5 years ago

maybe because of this:
app/models/issue.rb

Line 1001:


    statuses << initial_status unless statuses.empty?
    statuses << default_status if include_default || (new_record? && statuses.empty?)

Actions #2

Updated by Mizuki ISHIKAWA over 5 years ago

I was able to reproduce this problem.

Actions #3

Updated by Taine Woo over 5 years ago

  • Status changed from New to Resolved

Resolved by detail view of each role under Roles and Permissions, and disable "Add issues" for specific tracker, by default "All trackers" will be selected.

Actions #4

Updated by Holger Just over 5 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Wont fix

This is expected behavior. To prevent users to create issues in a specific tracker, remove the Add issues permission for that tracker.

Actions

Also available in: Atom PDF