RT 3.6.3 Mandatory CF's

Hi RT Users,

just a simple question for Custom Fields:

Can a Custom Field be ‘validate’, and non-mandatory?

This means, only a check that the content is a Number and nothing else but
not needed or mandatory?

MFG

Torsten Brumm

http://www.torsten-brumm.de

Yes. Write a regular expression that matches are number or
nothing.On Wed, Feb 07, 2007 at 05:10:43PM +0100, Torsten Brumm wrote:

Hi RT Users,

just a simple question for Custom Fields:

Can a Custom Field be ‘validate’, and non-mandatory?

This means, only a check that the content is a Number and nothing else but
not needed or mandatory?


MFG

Torsten Brumm

http://www.torsten-brumm.de


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I have! But, if i leave this field empty, i cant update the ticket…! So i
mean, this field must able to be empty or only with a number…

Whats wrong?

Torsten2007/2/7, Todd Chapman todd@chaka.net:

Yes. Write a regular expression that matches are number or
nothing.

On Wed, Feb 07, 2007 at 05:10:43PM +0100, Torsten Brumm wrote:

Hi RT Users,

just a simple question for Custom Fields:

Can a Custom Field be ‘validate’, and non-mandatory?

This means, only a check that the content is a Number and nothing else
but
not needed or mandatory?


MFG

Torsten Brumm

http://www.torsten-brumm.de


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de

On Mer 7 f�vrier 2007 17:21, Torsten Brumm a �crit :

I have! But, if i leave this field empty, i cant update the ticket…! So
i mean, this field must able to be empty or only with a number…

Whats wrong?

Can you send your regular expression?

Raph.

for nothing did you do:
$cf eq ''
or
(!$cf) ??
it should be (!$cf)
Roy

Torsten Brumm wrote:

just a simple question for Custom Fields:
Can a Custom Field be ‘validate’, and non-mandatory?
This means, only a check that the content is a Number and nothing else
but
not needed or mandatory?

Actually, we are just in the process at where I work of modifying RT to
make “Mandatory” a completely separate checkbox to format validation
partly for this very reason. We want all this in the core API so it’s
enforced for all interfaces (GUI, REST, Email …) and so “being
mandatory” is completely separate from “matching a certain pattern”.
There are a few reasons why this makes sense and it’s really important
when using RT in an audited change management environment. We’ll
probably be posting the patches when it’s done (fairly soon).

PK

just a simple question for Custom Fields:
Can a Custom Field be ‘validate’, and non-mandatory?
This means, only a check that the content is a Number and
nothing else
but
not needed or mandatory?

Actually, we are just in the process at where I work of
modifying RT to
make “Mandatory” a completely separate checkbox to format validation
partly for this very reason. We want all this in the core API so it’s
enforced for all interfaces (GUI, REST, Email …) and so “being
mandatory” is completely separate from “matching a certain pattern”.
There are a few reasons why this makes sense and it’s really important
when using RT in an audited change management environment. We’ll
probably be posting the patches when it’s done (fairly soon).

PK

I thought that using the current interface, if you wanted to make
something non-mandatory, you could just wrap a ‘()?’ around it (not
including quotes)? I’m pretty sure I’ve seen that posted to the mailing
list as well.

Eric Schultz
United Online

Eric Schultz wrote:

I thought that using the current interface, if you wanted to make
something non-
mandatory, you could just wrap a ‘()?’ around it (not including
quotes)? I’m pretty
sure I’ve seen that posted to the mailing list as well.

You can, but when you try to make sure the other interfaces (REST,
Email) obey mandatory fields, you find that you really need to code
mandatory and format enforcement in different ways and at different
places so it makes sense to split it up. Also, conceptually, a mandatory
field is a completely different thing from a field of a certain format.
For auditors, seeing a checkbox saying “mandatory” is a whole lot more
convincing than a match-all regexp (if they even know what a regexp is
…).