Defect #35224

Adding new project impossible with mandatory custom field of type users

Added by Marc Cramer 5 months ago. Updated 5 months ago.

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

0%

Category:Projects
Target version:-
Resolution: Affected version:4.1.2

Description

Redmine: 4.1.2
Rails: 5.2.4.4
PostgreSQL: 12.5
No Plugins

I was just hit by this issue, kind of a logical bug:

I cannot add a new project if there is a mandatory custom field with a user
drop-down list, since there are no users initially--but I cannot add users
unless the project has been created...

To reproduce:

- Add a custom field to projects
- Field type: Users
- Make the field mandatory
- Try to add a new project

Expected behaviour:

- Find a prefilled list of users in the drop down
- Able to submit (create new project)

Current behaviour:

- User list is empty (possibly because the project has no users?)
- Toggling inheritage of users does not help
- Cannot submit project because the custom field is still empty but mandatory

Workaround:

- Make custom field optional
- Add project (with empty user selection)
- Add users to the project
- Edit project again and select user from drop down list

Am I missing something trivial?

Thanks

History

#1 Updated by Go MAEDA 5 months ago

Marc Cramer wrote:

Expected behaviour:

- Find a prefilled list of users in the drop down
- Able to submit (create new project)

Current behaviour:

- User list is empty (possibly because the project has no users?)
- Toggling inheritage of users does not help
- Cannot submit project because the custom field is still empty but mandatory

I agree that there is a problem with the current behavior as you pointed out, but if the behavior changed as above, the project will be created with the required custom field blank. This means that fixing this "bug" makes another bug.

#2 Updated by Marc Cramer 5 months ago

Go MAEDA wrote:

Marc Cramer wrote:

Expected behaviour:

- Find a prefilled list of users in the drop down
- Able to submit (create new project)

Current behaviour:

- User list is empty (possibly because the project has no users?)
- Toggling inheritage of users does not help
- Cannot submit project because the custom field is still empty but mandatory

I agree that there is a problem with the current behavior as you pointed
out, but if the behavior changed as above, the project will be created with
the required custom field blank. This means that fixing this "bug" makes
another bug.

Yeah, right... Maybe we should then distinguish a bit:

I can imagine a lot of cases (like mine) where it makes sense to select a user
from the drop-down list that is just any existing user and unrelated to
the users being assigened to the project.

So, it sounds like this issue is direcing us towards a RFE to have a custom
field type like 'project member' vs. 'any user'.

In my case I'd need something like a drop-down for 'any user'.

Does that make sense to you?

#3 Updated by Marc Cramer 5 months ago

Ok, can we move this into the Open Features list then somehow?

Summary: Custom field 'users' should be split into 'users (project members)' and 'users (all)'
since a mandatory user drop-down prevents from adding new projects because there are no users
yet.

Also available in: Atom PDF