Hello,
I have a question about date type fields for the CMDB. Even when is not required in the definition class code, the date is autofilled and we would like to keep it blank as some dates are not known yet. Is that normal? I´m thinking just in the way of leaving that fields as text type, to avoid that.
I´m attaching a photo, if that may help.
Thank you
CMDB date field always required?
Moderator: crythias
CMDB date field always required?
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 4251
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CMDB date field always required?
Hi,
Did you try to make it optional? Would be the easier to see your class definition.
- Roy
Did you try to make it optional? Would be the easier to see your class definition.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Re: CMDB date field always required?
Hi, the date fields not mandatory should have empty option i guess. The definition of the last 2 date fields is:
{
Key => 'RevocationDate',
Name => 'Revocation Date',
Searchable => 1,
Input => {
Type => 'Date',
YearPeriodPast => 20,
YearPeriodFuture => 10,
Required => 0,
},
},
{
Key => 'ExpirationDate',
Name => 'Expiration Date',
Searchable => 1,
Input => {
Type => 'Date',
YearPeriodPast => 20,
YearPeriodFuture => 10,
Required => 1,
},
So for the expirationdate, the required 1 is fine, as should be mandatory. The revocationdate does not allow me to be empty and that is a problem for us.
Any idea? OTRS 5.0.28
Thank you
{
Key => 'RevocationDate',
Name => 'Revocation Date',
Searchable => 1,
Input => {
Type => 'Date',
YearPeriodPast => 20,
YearPeriodFuture => 10,
Required => 0,
},
},
{
Key => 'ExpirationDate',
Name => 'Expiration Date',
Searchable => 1,
Input => {
Type => 'Date',
YearPeriodPast => 20,
YearPeriodFuture => 10,
Required => 1,
},
So for the expirationdate, the required 1 is fine, as should be mandatory. The revocationdate does not allow me to be empty and that is a problem for us.
Any idea? OTRS 5.0.28
Thank you
-
- Administrator
- Posts: 4251
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: CMDB date field always required?
Hi,
I would try this:
- Roy
I would try this:
Code: Select all
{
Key => 'RevocationDate',
Name => 'Revocation Date',
Searchable => 1,
Input => {
Type => 'Date',
YearPeriodPast => 20,
YearPeriodFuture => 10,
Required => 0,
},
CountMin => 0,
CountMax => 1,
CountDefault => 0,
}
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Re: CMDB date field always required?
Oh yeah, it worked!
THank you Roy

THank you Roy


