Re: [rt-users] Forcing a custom field to be a mandatory date

2011-04-15 Thread Kenneth Crocker
Kevin,

I thought I had read somewhere that 3.8.8 had a Custom Field type option for
Dates. I was hoping this was true so I could throw away the Custom Code I am
using that was contributed by Emmanuel Lacour. Right now, the code works
pretty well, other than I have no options to format the data to be
consistent with my date formatting preferences for other date fields.

If this is NOT the case, are there any plans to put the RT 4 code into
3.8.10?

Thanks.

Kenn
LBNL

On Mon, Apr 11, 2011 at 1:46 PM, Kevin Falcone falc...@bestpractical.comwrote:

 On Mon, Apr 11, 2011 at 11:12:13AM -0700, Kenneth Crocker wrote:
 2) If on 3.8.8+, you can make the CF a SelectDate field and get the
 use of Calendar.

 The SelectDate field that you are referencing is a third party patch
 with known problems and we cannot advise that you use it.

 We have reimplemented this feature properly for RT4

 -kevin

 However, there is no built-in way to make the field mandatory unless
 you add some of your
 own code. This has been discussed in past threads. We choose to keep
 the basic code and work
 around the problem by writing a scrip to use another CF and re-set the
 Status field (to
 stalled when they resolve without setting the date field) and then
 send email
 notifications to alert the ticket owners that they need to put in the
 date field). This is a
 bit simple, but keeps us from messing with code. However, there are
 some other options
 discussed that modify the RT code and allow the CF to be treated as a
 TRULY mandatory field.
 Check out the threads. I believe there is even a link to some of that
 code.
 
 Hope this helps.
 
 Kenn
 LBNL
 
 On Mon, Apr 11, 2011 at 6:30 AM, Vance Walsh [1]
 vance_wa...@concordacademy.org wrote:
 
   What would be the proper string to make a Custom field Mandatory and
 contain a date field?
   ---
   Vance Walsh
   Network and Systems Administrator
   Concord Academy - Concord, Mass.
 



Re: [rt-users] Forcing a custom field to be a mandatory date

2011-04-15 Thread Kevin Falcone
On Fri, Apr 15, 2011 at 09:51:34AM -0700, Kenneth Crocker wrote:
I thought I had read somewhere that 3.8.8 had a Custom Field type option 
 for Dates. I was
hoping this was true so I could throw away the Custom Code I am using that 
 was contributed by
Emmanuel Lacour. Right now, the code works pretty well, other than I have 
 no options to format
the data to be consistent with my date formatting preferences for other 
 date fields.

This is not the case

If this is NOT the case, are there any plans to put the RT 4 code into 
 3.8.10?

This code has not been backported to 3.8 and is unlikely to be
backported since it was quite a bit of work to get right for 4.

-kevin


pgprPvMq4UVnY.pgp
Description: PGP signature


Re: [rt-users] Forcing a custom field to be a mandatory date

2011-04-15 Thread Kenneth Crocker
Kevin,

OK. Got it. Thanks for your time on this.

Kenn
LBNL

On Fri, Apr 15, 2011 at 10:24 AM, Kevin Falcone
falc...@bestpractical.comwrote:

 On Fri, Apr 15, 2011 at 09:51:34AM -0700, Kenneth Crocker wrote:
 I thought I had read somewhere that 3.8.8 had a Custom Field type
 option for Dates. I was
 hoping this was true so I could throw away the Custom Code I am using
 that was contributed by
 Emmanuel Lacour. Right now, the code works pretty well, other than I
 have no options to format
 the data to be consistent with my date formatting preferences for
 other date fields.

 This is not the case

 If this is NOT the case, are there any plans to put the RT 4 code into
 3.8.10?

 This code has not been backported to 3.8 and is unlikely to be
 backported since it was quite a bit of work to get right for 4.

 -kevin



[rt-users] Forcing a custom field to be a mandatory date

2011-04-11 Thread Vance Walsh
What would be the proper string to make a Custom field Mandatory and contain
a date field?

---

Vance Walsh
Network and Systems Administrator
Concord Academy - Concord, Mass.



Re: [rt-users] Forcing a custom field to be a mandatory date

2011-04-11 Thread Kenneth Crocker
Vance,

Well, there are a few vastly different ways to do this:

1) If on rt 3.6.x, you can use any of these formatting sequences:

# for format control of mm/dd/

(?#Date
mm/dd/)^(((0)?[1-9]|1[0-2])\/((0)?[1-9]|[12][0-9]|3[01])\/([12][0-9])?[0-9][0-9])?$

# for format control of /mm/dd hh:mi:ss

(?#Date /mm/dd
hh:mi:ss)^(([1-2][0-9][0-9][0-9])\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|3[0-1])
(0[1-9]|1[0-2]):(0[1-9]|1[0-2]):(0[1-9]|1[0-2]))?$

# for format control of /mm/dd

(?#Date
/mm/dd)^(([1-2][0-9][0-9][0-9])\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|3[0-1]))?$

2) If on 3.8.8+, you can make the CF a SelectDate field and get the use of
Calendar. However, there is no built-in way to make the field mandatory
unless you add some of your own code. This has been discussed in past
threads. We choose to keep the basic code and work around the problem by
writing a scrip to use another CF and re-set the Status field (to stalled
when they resolve without setting the date field) and then send email
notifications to alert the ticket owners that they need to put in the date
field). This is a bit simple, but keeps us from messing with code. However,
there are some other options discussed that modify the RT code and allow the
CF to be treated as a TRULY mandatory field. Check out the threads. I
believe there is even a link to some of that code.

Hope this helps.

Kenn
LBNL

On Mon, Apr 11, 2011 at 6:30 AM, Vance Walsh vance_wa...@concordacademy.org
 wrote:

  What would be the proper string to make a Custom field Mandatory and
 contain a date field?

 ---

 Vance Walsh
 Network and Systems Administrator
 Concord Academy - Concord, Mass.




Re: [rt-users] Forcing a custom field to be a mandatory date

2011-04-11 Thread Kevin Falcone
On Mon, Apr 11, 2011 at 11:12:13AM -0700, Kenneth Crocker wrote:
2) If on 3.8.8+, you can make the CF a SelectDate field and get the use 
 of Calendar.

The SelectDate field that you are referencing is a third party patch
with known problems and we cannot advise that you use it.

We have reimplemented this feature properly for RT4

-kevin

However, there is no built-in way to make the field mandatory unless you 
 add some of your
own code. This has been discussed in past threads. We choose to keep the 
 basic code and work
around the problem by writing a scrip to use another CF and re-set the 
 Status field (to
stalled when they resolve without setting the date field) and then 
 send email
notifications to alert the ticket owners that they need to put in the date 
 field). This is a
bit simple, but keeps us from messing with code. However, there are some 
 other options
discussed that modify the RT code and allow the CF to be treated as a 
 TRULY mandatory field.
Check out the threads. I believe there is even a link to some of that code.
 
Hope this helps.
 
Kenn
LBNL
 
On Mon, Apr 11, 2011 at 6:30 AM, Vance Walsh 
 [1]vance_wa...@concordacademy.org wrote:
 
  What would be the proper string to make a Custom field Mandatory and 
 contain a date field?
  ---
  Vance Walsh
  Network and Systems Administrator
  Concord Academy - Concord, Mass.
 


pgpVPKrkyJHGb.pgp
Description: PGP signature