Defect #19417

status change is allowed with empty workflow-required custom field

Added by E Lipinsky almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues workflow
Target version:-
Resolution:Duplicate Affected version:2.6.1

Description

Environment:
Redmine version 2.6.1.stable
Ruby version 2.0.0-p598 (2014-11-13) [x86_64-linux]
Rails version 3.2.21
Environment production
Database adapter Mysql2 (Ver 14.14 Distrib 5.5.40)
SCM:
Subversion 1.8.10
Git 1.9.5
Filesystem
Redmine plugins:
redmine_issue_templates 0.1.0
scrum2b 2.0

Steps:
  1. Create a custom field of type 'long text' (not required). (I think a field of type 'text' has the same issue.)
  2. In Administration / Workflow / Fields Permissions, set a state for the custom field to Required. Click Save.
  3. Go to an issue; without setting the field value, try to change the state to the state specified in step 2.

Expected:
Change to the state is blocked. Maybe the custom field shows as required with red asterisk?

Actual:
Change to the state is allowed. Field shows without red asterisk.


Related issues

Duplicates Redmine - Defect #11887: Issue permission doesn't apply to Administrators New

History

#1 Updated by Toshi MARUYAMA over 2 years ago

  • Status changed from New to Needs feedback

I cannot reproduce on 2.6.3.

#2 Updated by E Lipinsky over 2 years ago

Thanks for the response.

After testing more, including on 2.6.5 and 3.0.3, I see what happened. When I set the custom field state to Required in Workflow, I did not do it for enough roles. In the end it seems like I needed to apply the setting to all roles for it to work as expected.

Not sure whether there is some issue in how the roles interact, or maybe the documentation could explain it more(?)

#3 Updated by Mischa The Evil over 2 years ago

E Lipinsky wrote:

After testing more, including on 2.6.5 and 3.0.3, I see what happened. When I set the custom field state to Required in Workflow, I did not do it for enough roles. In the end it seems like I needed to apply the setting to all roles for it to work as expected.

Not sure whether there is some issue in how the roles interact, or maybe the documentation could explain it more(?)

You are probably testing this with a user account configured to be an Administrator. I've explained the expected behavior for this situation with references recently in RE: Validation on issue tracker before closing an issue?.
Another thing that might cause issues like this is that if a user has multiple roles on the same project, then only fields required/read-only for all its roles are actually required/read-only.

Hope this helps, Mischa.

#4 Updated by E Lipinsky over 2 years ago

Thanks Mischa, that does help. I think it was a combination of the Administrator and multiple role scenarios.

#5 Updated by Mischa The Evil over 2 years ago

E Lipinsky wrote:

Thanks Mischa, that does help. I think it was a combination of the Administrator and multiple role scenarios.

I see. So this issue can be closed as it is the current expected behavior?

#6 Updated by E Lipinsky over 2 years ago

Mischa The Evil wrote:

I see. So this issue can be closed as it is the current expected behavior?

Ok, sure. Thanks.

#7 Updated by Mischa The Evil over 2 years ago

  • Duplicates Defect #11887: Issue permission doesn't apply to Administrators added

#8 Updated by Mischa The Evil over 2 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Duplicate

Also available in: Atom PDF