Sorry for the newbie question, but I could not find anything in these forums.
I have a custom field that I want on all displays, views and reports but I do not want it to be a required field. I've tried several things in Manage Custom Fields but nothing works and the entry/update screen continues to make it required.
What is the secret (or not-so-secret) sauce?
Optional custom fields
Moderators: Developer, Contributor
Re: Optional custom fields
I am not able to reproduce the issue using the given information.
Which version of MantisBT do you use?
Adding a screen shot of the custom field definition might help.
Which version of MantisBT do you use?
Adding a screen shot of the custom field definition might help.
Re: Optional custom fields
Here is a screen shot of the definition and the requirement to put in a value (as a blank will generate an error that there is nothing in it):
https://www.screencast.com/t/tubQtCMQlkd
I did try unchecking a bunch of the stuff and nothing worked.
Thanks for trying to help and maybe you know the answer!
https://www.screencast.com/t/tubQtCMQlkd
I did try unchecking a bunch of the stuff and nothing worked.
Thanks for trying to help and maybe you know the answer!
Re: Optional custom fields
I also tried 0 min length and when that didn't work I went back to 2 min length. Ideally I want to have no value or "Yes". This issue forces me to add "No".
Re: Optional custom fields
But you enabled check box "Required On Report". Uncheck it and reset also the Min. / Max. Lengths to 0Rob wrote:I do not want it to be a required field.
Re: Optional custom fields
Newbie learning. I thought Report meant listing. Your suggestion worked perfectly.
Since I don't need a "No" (blank is actually better in our use case), I changed it to a string. Is there any magic to just allowing either a blank or "Yes"? I tried a few things like Possible Values as " |Yes" but it allowed "xxx". I was able to have blank or "Yes" as a list and maybe that is the better way to do it? If it is, how do I get blank as the default? Adding a space in Default Value had no effect.
Since I don't need a "No" (blank is actually better in our use case), I changed it to a string. Is there any magic to just allowing either a blank or "Yes"? I tried a few things like Possible Values as " |Yes" but it allowed "xxx". I was able to have blank or "Yes" as a list and maybe that is the better way to do it? If it is, how do I get blank as the default? Adding a space in Default Value had no effect.
Re: Optional custom fields
Code: Select all
|YES
Re: Optional custom fields
Any empty checkbox would not make sense to a person who doesn't know.
See attached. I tried using the List with both a space (" |Yes") and a null ("|Yes"), but I can't get the default of space/null to work in both cases. I can live with forcing to click space/null, but it's not ideal. Any suggestions? Is this a bug?
See attached. I tried using the List with both a space (" |Yes") and a null ("|Yes"), but I can't get the default of space/null to work in both cases. I can live with forcing to click space/null, but it's not ideal. Any suggestions? Is this a bug?
Re: Optional custom fields
The screen shot is showing space is the default but when I add the issue it that is not happening (some kind of screen shot quirk). However, I just added an issue and did not touch the list and it created a blank so perhaps it is working after all.
Re: Optional custom fields
Here is a better screen shot. It is not highlighting the blank, but it is creating a blank when nothing selected and since it is not a required field I think that's why it's working. The blank has to be there in case we want to change a Yes to a blank.