https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-10-19T23:50:37ZRedmineRedmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=421822012-10-19T23:50:37ZMischa The Evil
<ul><li><strong>Subject</strong> changed from <i>Mandatory custon field "fixed version" with Multiple values</i> to <i>Mandatory custom field "fixed version" with Multiple values</i></li></ul><p>Are you testing with an <em>administrator</em> account? If yes, take a look at <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue permission doesn't apply to Administrators (New)" href="https://www.redmine.org/issues/11887#note-2">#11887#note-2</a> (quote: "Currently, admin users inherits workflow/fields permissions for all roles. So if the field is not required for at least one role, it's not required for admins. But if you set the field required for all roles, then it will be required for admin users too.").</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=421862012-10-20T00:47:41ZMateus Anacleto
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p>Are you testing with an <em>administrator</em> account? If yes, take a look at <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue permission doesn't apply to Administrators (New)" href="https://www.redmine.org/issues/11887#note-2">#11887#note-2</a> (quote: "Currently, admin users inherits workflow/fields permissions for all roles. So if the field is not required for at least one role, it's not required for admins. But if you set the field required for all roles, then it will be required for admin users too.").</p>
</blockquote>
<p>No i am testing with a normal user account. I believe that the problem is the type of field(version).<br />This field is required only same profiles, maybe if This field will required for all profiles ,can be work, but i didn´t test this situation.</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=430672012-11-25T21:40:53ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li></ul><p>Mateus Anacleto wrote:</p>
<blockquote>
<p>Mischa The Evil wrote:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>No i am testing with a normal user account. I believe that the problem is the type of field(version).<br />This field is required only same profiles, maybe if This field will required for all profiles ,can be work, but i didn´t test this situation.</p>
</blockquote>
<p>I've spent some time trying to reproduce this issue's report on m.redmine.org (~2.1.0) and I've found a way to do it. I'll outline it below.</p>
<p>This happens <em>only</em> with a custom field with multiple allowed values (thus of the types <code>list</code>, <code>user</code> or <code>version</code>), required for a certain role-tracker-status combination configured via Administration -> Workflows -> Fields permissions. In this situation a <code>nil</code> value for the custom field is accepted during status transition (to a status on which a value for the custom field is required) of an issue on a configured tracker, by a user with the configured role. The visual indication besides the custom field is displayed as if a custom field value is indeed required, but it isn't.<br />The result is that the status transition <strong>is allowed</strong> with a <code>nil</code> value for the custom field.</p>
<p>Configuring the custom field with multiple allowed values via Administration -> Custom fields -> <em>Custom field type</em> -> <em>Custom field</em> -> <em>Required</em> (thus required for all role-tracker-status combinations) leads to a situation where <code>nil</code> values for custom fields actually <strong>are not allowed</strong>.</p>
<p>Remaining question would be: is this by design or not?</p>
<p>Please let me know if there is more info needed...</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=450212013-01-27T04:41:42ZMischa The Evil
<ul><li><strong>Subject</strong> changed from <i>Mandatory custom field "fixed version" with Multiple values</i> to <i>Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transition</i></li></ul> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=518732013-09-18T07:50:30ZJürgen Diez
<ul><li><strong>File</strong> <a href="/attachments/10478">11_correct_bug_with_required_cf_with_multiple_values.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/10478/11_correct_bug_with_required_cf_with_multiple_values.patch">11_correct_bug_with_required_cf_with_multiple_values.patch</a> added</li></ul><p>The source of this problem is that the <code>validate_required_fields</code> function for the <code>issue</code> model does not check multiple custom field values in arrays.</p>
<p>I attached a patch based on Version <a class="version" href="https://www.redmine.org/versions/66">2.2.2</a> that solved the problem for me.</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=533052013-11-22T07:26:12ZJürgen Diez
<ul></ul><p>It looks like this problem is still present in the current trunk (<a class="changeset" title="code format cleanup app/models/issue.rb" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/12230">r12230</a>).<br />Is there a possibility to get this fixed in the next version?<br />How can I assist you in fixing this issue?</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=582492014-08-26T07:13:20ZEtienne Massip
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>If confirmed, then should be fixed with next version?</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=583762014-09-01T12:26:24ZJean-Baptiste Barth
<ul><li><strong>Assignee</strong> set to <i>Jean-Baptiste Barth</i></li><li><strong>Affected version</strong> changed from <i>2.1.0</i> to <i>2.5.2</i></li></ul><p>Somebody just confirmed it on IRC. And it seems the patch works. The patch needs tests to ensure we don't introduce a regression later. I'll have a look at this unless somebody else wants it...</p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=701372016-04-04T16:14:33Z@ go2null
<ul></ul><p>Duplicated by <a class="issue tracker-2 status-10 priority-4 priority-default" title="Feature: Field conditions depending on ticket status (Needs feedback)" href="https://www.redmine.org/issues/13891">#13891</a></p> Redmine - Defect #12146: Required (list-, user- or version) custom field "fixed version" with Multiple values allows nil value during status transitionhttps://www.redmine.org/issues/12146?journal_id=706552016-05-01T10:59:52ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-10 priority-4 priority-default" href="/issues/13891">Feature #13891</a>: Field conditions depending on ticket status</i> added</li></ul>