How to make default field mandatory

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
udo
Posts: 47
Joined: 09 Sep 2010, 11:42

How to make default field mandatory

Post by udo »

hi,

I would like to make the default field Target Version (target_version) mandatory. How can I do that?

thanks, udo
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make default field mandatory

Post by atrol »

You can write a custom functions for this
http://docs.mantisbt.org/master/en/admi ... USTOMFUNCS
Please use Search before posting and read the Manual
udo
Posts: 47
Joined: 09 Sep 2010, 11:42

Re: How to make default field mandatory

Post by udo »

I did not pursue this suggestion because I was not comfortable with such a "hack" for a default field. This configuration possibility should be provided "out of the box"...
Note: Don't get me wrong here. I appreciate the answer because it provides a workaround!

Will the user be able to identify this "pseudo mandatory field" before he submits the form?

Probably not -> So he will always see the error message... -> So he will return to previous page -> If he uses a modern browser, he will be lucky and still have the data available -> In case he uses some old school browser, his data will be lost and he will frustrated to re-enter the data... -> not good

Any solution for this?
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make default field mandatory

Post by atrol »

AFAIK there is no other solution than to change the source code.
This is a known feature request.
http://www.mantisbt.org/bugs/view.php?id=8941
Please use Search before posting and read the Manual
spencerjw

Re: How to make default field mandatory

Post by spencerjw »

atrol wrote:AFAIK there is no other solution than to change the source code.
This is a known feature request.
http://www.mantisbt.org/bugs/view.php?id=8941
I would love to see some further advancement on this request too. This has become a great need on our install and I am not really interested in the idea of hacking the code to make this work when it seems like it should have been a feature out of the box.
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make default field mandatory

Post by atrol »

spencerjw wrote: I would love to see some further advancement on this request too.
Patches are welcome, you can fork MantisBT from https://www.github.com/mantisbt, develop the needed changes and send a pull request.
spencerjw wrote: This has become a great need on our install and I am not really interested in the idea of hacking the code to make this work
You don't have to hack the code, there is a clean solution where you don't have to change any existing code of MantisBT
atrol wrote:You can write a custom functions for this
http://docs.mantisbt.org/master/en/admi ... USTOMFUNCS
Please use Search before posting and read the Manual
Post Reply