[rt-users] Can values of Custom Field be based on Queue?

2015-10-26 Thread Chrilly Cheng
Hi All,

I'm trying to find to way to get this requirement work.

We have multiple queues in RT, like queueA, queueB, queueC. All queues are
using the same Custom Field that applied to them. One of those Custom
Fields is called Customer, which is using external values from a REST API.
What we want is in different queue, this Customer filed should shows
different drop-down list for user to select.

Can this be done? It's quite a reasonable requirement. Any thought would be
appreciated, thank you.


BR,
Chrilly


Re: [rt-users] Custom Field use External values based on queue

2015-09-07 Thread Chrilly Cheng
Hi All,

Does anyone have the same requirement? I think it is reasonable to use
Custom Field values based on Queue. Any suggestions please?


BR,
Chrilly

On Fri, Aug 7, 2015 at 7:40 PM, Chrilly Cheng  wrote:

> Hi All,
>
> Any idea on this requirement? Is there any way doable? Please kindly
> suggest, thanks.
>
>
> BR,
> Vodar
>
> On Tue, Aug 4, 2015 at 8:26 PM, Chrilly Cheng  wrote:
>
>> Hi All,
>>
>> I'm trying to reach a requirement that we want one global custom field,
>> which is using external values that populated with some REST API, to has
>> different drop-down list filtered by Queue name. Is this possible to config
>> in /lib/RT/CustomFieldValues/xx.pm file? Or is there any other way to
>> accomplish this requirement?
>>
>> Any comments would be appreciated. Thanks a lot.
>>
>>
>> Best Regards,
>> Chrilly
>>
>
>


Re: [rt-users] Custom Field use External values based on queue

2015-08-07 Thread Chrilly Cheng
Hi All,

Any idea on this requirement? Is there any way doable? Please kindly
suggest, thanks.


BR,
Vodar

On Tue, Aug 4, 2015 at 8:26 PM, Chrilly Cheng  wrote:

> Hi All,
>
> I'm trying to reach a requirement that we want one global custom field,
> which is using external values that populated with some REST API, to has
> different drop-down list filtered by Queue name. Is this possible to config
> in /lib/RT/CustomFieldValues/xx.pm file? Or is there any other way to
> accomplish this requirement?
>
> Any comments would be appreciated. Thanks a lot.
>
>
> Best Regards,
> Chrilly
>


[rt-users] Custom Field use External values based on queue

2015-08-04 Thread Chrilly Cheng
Hi All,

I'm trying to reach a requirement that we want one global custom field,
which is using external values that populated with some REST API, to has
different drop-down list filtered by Queue name. Is this possible to config
in /lib/RT/CustomFieldValues/xx.pm file? Or is there any other way to
accomplish this requirement?

Any comments would be appreciated. Thanks a lot.


Best Regards,
Chrilly


Re: [rt-users] Unable to grant Status changes rights to user

2015-06-29 Thread Chrilly Cheng
Issue resolved by rename the rights. It only supports 25 characters length.


BR,
Chrilly

On Wed, Jun 24, 2015 at 5:12 PM, Chrilly Cheng  wrote:

> Hi All,
>
> I was trying to create a new lifecycle based on our workflow. It works
> until I try to set some Status changes rights in config file. I cannot
> grant those rights to any user or group with root permission. I'm using
> 4.0.7 version. I copied the error log and my settings at below, please
> someone kindly help to check on it, thanks a lot.
>
> I was unable to grant 'Update ticket to inactive' rights.
> Error log:
> [error]: Invalid right. Couldn't canonicalize right 'Reopen Case'
> (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'Update ticket to
> inactive' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'AutoSet by Crontool
> task(' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [warn]: Tried to revoke the invalid right 'Reopen Case', ignoring it.
> (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'Update ticket to inactive',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'AutoSet by Crontool task(',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
>
> Here is the lifecycle setting:
> Set(%Lifecycles,
>
> # modify the default lifecycle
> newlifecycle => {
> # All the appropriate ticket statuses
> initial => [ 'InProgress' ],
> active  => [
> 'PeerReviewed','WaitingforApproval','Scheduled','ScheduledTimePassed' ],
> inactive=> [
> 'ChangeCompleted','ChangeUnsuccessful','ChangeBackedOut','DidNotStart' ],
>
> # Default ticket statuses for certain actions
> defaults => {
> on_create => 'InProgress',
> },
>
> # Status change restrictions
> transitions => {
> 'InProgress'=> [qw(PeerReviewed)],
> 'PeerReviewed'=> [qw(WaitingforApproval)],
> 'WaitingforApproval'=> [qw(InProgress Scheduled)],
> 'Scheduled' => [qw(InProgress
> ScheduledTimePassed)],
> 'ScheduledTimePassed'   => [qw(ChangeCompleted
> ChangeUnsuccessful ChangeBackedOut DidNotStart)],
> },
>
> # Rights for different actions
> rights => {
>
> # These rights are in the default lifecycle
> 'WaitingforApproval -> Scheduled'   => 'Right to
> approve ticket',
> '* -> InProgress'=> 'Right to
> unapprove ticket',
> 'Scheduled -> ScheduledTimePassed'=> 'AutoSet by
> Crontool task(Do not grant)',
> 'ScheduledTimePassed -> *'  => 'Update ticket
> to inactive status',
> },
>
> # Actions for the web UI
> actions => [
> 'InProgress -> PeerReviewed' => {
> label  => 'Peer Review Completed',
> update => 'Comment',
> },
> 'PeerReviewed -> WaitingforApproval' => {
> label  => 'Submit for Approval',
> update => 'Correspond',
> },
> 'WaitingforApproval -> Scheduled' => {
> label  => 'Approve it',
> update => 'Commment',
> },
> 'WaitingforApproval -> InProgress' => {
> label  => 'Unapprove it',
> update => 'Comment',
> },
> 'Scheduled -> InProgress'=> {
> label  => 'Unapprove it',
> update => 'Correpond',
> },
> 'ScheduledTimePassed -> ChangeCompleted' => {
> label  => 'Change Completed Successfully',
&

Re: [rt-users] Unable to grant Status changes rights to user

2015-06-25 Thread Chrilly Cheng
Hi All,

I tried this lifecycle on a new installed RT, it still has the same
problem. I cannot find any clue of it. Please help!


BR,
Chrilly

On Wed, Jun 24, 2015 at 5:12 PM, Chrilly Cheng  wrote:

> Hi All,
>
> I was trying to create a new lifecycle based on our workflow. It works
> until I try to set some Status changes rights in config file. I cannot
> grant those rights to any user or group with root permission. I'm using
> 4.0.7 version. I copied the error log and my settings at below, please
> someone kindly help to check on it, thanks a lot.
>
> I was unable to grant 'Update ticket to inactive' rights.
> Error log:
> [error]: Invalid right. Couldn't canonicalize right 'Reopen Case'
> (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'Update ticket to
> inactive' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'AutoSet by Crontool
> task(' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [warn]: Tried to revoke the invalid right 'Reopen Case', ignoring it.
> (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'Update ticket to inactive',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'AutoSet by Crontool task(',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
>
> Here is the lifecycle setting:
> Set(%Lifecycles,
>
> # modify the default lifecycle
> newlifecycle => {
> # All the appropriate ticket statuses
> initial => [ 'InProgress' ],
> active  => [
> 'PeerReviewed','WaitingforApproval','Scheduled','ScheduledTimePassed' ],
> inactive=> [
> 'ChangeCompleted','ChangeUnsuccessful','ChangeBackedOut','DidNotStart' ],
>
> # Default ticket statuses for certain actions
> defaults => {
> on_create => 'InProgress',
> },
>
> # Status change restrictions
> transitions => {
> 'InProgress'=> [qw(PeerReviewed)],
> 'PeerReviewed'=> [qw(WaitingforApproval)],
> 'WaitingforApproval'=> [qw(InProgress Scheduled)],
> 'Scheduled' => [qw(InProgress
> ScheduledTimePassed)],
> 'ScheduledTimePassed'   => [qw(ChangeCompleted
> ChangeUnsuccessful ChangeBackedOut DidNotStart)],
> },
>
> # Rights for different actions
> rights => {
>
> # These rights are in the default lifecycle
> 'WaitingforApproval -> Scheduled'   => 'Right to
> approve ticket',
> '* -> InProgress'=> 'Right to
> unapprove ticket',
> 'Scheduled -> ScheduledTimePassed'=> 'AutoSet by
> Crontool task(Do not grant)',
> 'ScheduledTimePassed -> *'  => 'Update ticket
> to inactive status',
> },
>
> # Actions for the web UI
> actions => [
> 'InProgress -> PeerReviewed' => {
> label  => 'Peer Review Completed',
> update => 'Comment',
> },
> 'PeerReviewed -> WaitingforApproval' => {
> label  => 'Submit for Approval',
> update => 'Correspond',
> },
> 'WaitingforApproval -> Scheduled' => {
> label  => 'Approve it',
> update => 'Commment',
> },
> 'WaitingforApproval -> InProgress' => {
> label  => 'Unapprove it',
> update => 'Comment',
> },
> 'Scheduled -> InProgress'=> {
> label  => 'Unapprove it',
> update => 'Correpond',
> },
> 'ScheduledTimePassed -> ChangeCompleted' => {
> label  =>

Re: [rt-users] Unable to grant Status changes rights to user

2015-06-24 Thread Chrilly Cheng
Any suggest please?


BR,
Chrilly

On Wed, Jun 24, 2015 at 5:12 PM, Chrilly Cheng  wrote:

> Hi All,
>
> I was trying to create a new lifecycle based on our workflow. It works
> until I try to set some Status changes rights in config file. I cannot
> grant those rights to any user or group with root permission. I'm using
> 4.0.7 version. I copied the error log and my settings at below, please
> someone kindly help to check on it, thanks a lot.
>
> I was unable to grant 'Update ticket to inactive' rights.
> Error log:
> [error]: Invalid right. Couldn't canonicalize right 'Reopen Case'
> (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'Update ticket to
> inactive' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [error]: Invalid right. Couldn't canonicalize right 'AutoSet by Crontool
> task(' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
> [warn]: Tried to revoke the invalid right 'Reopen Case', ignoring it.
> (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'Update ticket to inactive',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
> [warn]: Tried to revoke the invalid right 'AutoSet by Crontool task(',
> ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
>
> Here is the lifecycle setting:
> Set(%Lifecycles,
>
> # modify the default lifecycle
> newlifecycle => {
> # All the appropriate ticket statuses
> initial => [ 'InProgress' ],
> active  => [
> 'PeerReviewed','WaitingforApproval','Scheduled','ScheduledTimePassed' ],
> inactive=> [
> 'ChangeCompleted','ChangeUnsuccessful','ChangeBackedOut','DidNotStart' ],
>
> # Default ticket statuses for certain actions
> defaults => {
> on_create => 'InProgress',
> },
>
> # Status change restrictions
> transitions => {
> 'InProgress'=> [qw(PeerReviewed)],
> 'PeerReviewed'=> [qw(WaitingforApproval)],
> 'WaitingforApproval'=> [qw(InProgress Scheduled)],
> 'Scheduled' => [qw(InProgress
> ScheduledTimePassed)],
> 'ScheduledTimePassed'   => [qw(ChangeCompleted
> ChangeUnsuccessful ChangeBackedOut DidNotStart)],
> },
>
> # Rights for different actions
> rights => {
>
> # These rights are in the default lifecycle
> 'WaitingforApproval -> Scheduled'   => 'Right to
> approve ticket',
> '* -> InProgress'=> 'Right to
> unapprove ticket',
> 'Scheduled -> ScheduledTimePassed'=> 'AutoSet by
> Crontool task(Do not grant)',
> 'ScheduledTimePassed -> *'  => 'Update ticket
> to inactive status',
> },
>
> # Actions for the web UI
> actions => [
> 'InProgress -> PeerReviewed' => {
> label  => 'Peer Review Completed',
> update => 'Comment',
> },
> 'PeerReviewed -> WaitingforApproval' => {
> label  => 'Submit for Approval',
> update => 'Correspond',
> },
> 'WaitingforApproval -> Scheduled' => {
> label  => 'Approve it',
> update => 'Commment',
> },
> 'WaitingforApproval -> InProgress' => {
> label  => 'Unapprove it',
> update => 'Comment',
> },
> 'Scheduled -> InProgress'=> {
> label  => 'Unapprove it',
> update => 'Correpond',
> },
> 'ScheduledTimePassed -> ChangeCompleted' => {
> label  => 'Change Completed Successfully',
> update => 'Comment&

[rt-users] Unable to grant Status changes rights to user

2015-06-24 Thread Chrilly Cheng
Hi All,

I was trying to create a new lifecycle based on our workflow. It works
until I try to set some Status changes rights in config file. I cannot
grant those rights to any user or group with root permission. I'm using
4.0.7 version. I copied the error log and my settings at below, please
someone kindly help to check on it, thanks a lot.

I was unable to grant 'Update ticket to inactive' rights.
Error log:
[error]: Invalid right. Couldn't canonicalize right 'Reopen Case'
(/usr/share/request-tracker4/lib/RT/ACE.pm:410)
[error]: Invalid right. Couldn't canonicalize right 'Update ticket to
inactive' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
[error]: Invalid right. Couldn't canonicalize right 'AutoSet by Crontool
task(' (/usr/share/request-tracker4/lib/RT/ACE.pm:410)
[warn]: Tried to revoke the invalid right 'Reopen Case', ignoring it.
(/usr/share/request-tracker4/lib/RT/Principal.pm:217)
[warn]: Tried to revoke the invalid right 'Update ticket to inactive',
ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)
[warn]: Tried to revoke the invalid right 'AutoSet by Crontool task(',
ignoring it. (/usr/share/request-tracker4/lib/RT/Principal.pm:217)

Here is the lifecycle setting:
Set(%Lifecycles,

# modify the default lifecycle
newlifecycle => {
# All the appropriate ticket statuses
initial => [ 'InProgress' ],
active  => [
'PeerReviewed','WaitingforApproval','Scheduled','ScheduledTimePassed' ],
inactive=> [
'ChangeCompleted','ChangeUnsuccessful','ChangeBackedOut','DidNotStart' ],

# Default ticket statuses for certain actions
defaults => {
on_create => 'InProgress',
},

# Status change restrictions
transitions => {
'InProgress'=> [qw(PeerReviewed)],
'PeerReviewed'=> [qw(WaitingforApproval)],
'WaitingforApproval'=> [qw(InProgress Scheduled)],
'Scheduled' => [qw(InProgress
ScheduledTimePassed)],
'ScheduledTimePassed'   => [qw(ChangeCompleted
ChangeUnsuccessful ChangeBackedOut DidNotStart)],
},

# Rights for different actions
rights => {

# These rights are in the default lifecycle
'WaitingforApproval -> Scheduled'   => 'Right to
approve ticket',
'* -> InProgress'=> 'Right to
unapprove ticket',
'Scheduled -> ScheduledTimePassed'=> 'AutoSet by
Crontool task(Do not grant)',
'ScheduledTimePassed -> *'  => 'Update ticket
to inactive status',
},

# Actions for the web UI
actions => [
'InProgress -> PeerReviewed' => {
label  => 'Peer Review Completed',
update => 'Comment',
},
'PeerReviewed -> WaitingforApproval' => {
label  => 'Submit for Approval',
update => 'Correspond',
},
'WaitingforApproval -> Scheduled' => {
label  => 'Approve it',
update => 'Commment',
},
'WaitingforApproval -> InProgress' => {
label  => 'Unapprove it',
update => 'Comment',
},
'Scheduled -> InProgress'=> {
label  => 'Unapprove it',
update => 'Correpond',
},
'ScheduledTimePassed -> ChangeCompleted' => {
label  => 'Change Completed Successfully',
update => 'Comment',
},
'ScheduledTimePassed -> ChangeUnsuccessful' => {
label  => 'Change Unsuccessful',
update => 'Comment',
},
'ScheduledTimePassed -> ChangeBackedOut' => {
label  => 'Change Backed Out',
update => 'Comment',
},
'ScheduledTimePassed -> DidNotStart' => {
label  => 'Did Not Start',
update => 'Comment',
},
],
},
# Status mapping different lifecycles
__maps__ => {
'default -> newlifecycle' => {
'new'  => 'InProgress',
'open' => 'WaitingforApproval',
'stalled'  => 'Scheduled',
'resolved' => 'ChangeCompleted',
'rejected' => 'ChangeBackedOut',
'deleted'  => 'DidNotStart',
},
'newlifecycle -> default' => {
'InProgress'=> 'new',
'PeerReviewed'=> 'open',
'WaitingforApproval'

Re: [rt-users] Problem in searching date

2014-09-05 Thread Chrilly Cheng
Hi Alex,

I found the cause of this issue. It's not a problem with "midnight Sunday"
or something, it is about the Custom Field. I set the build-in Starts date
to "Proposed Start Time(GMT)", then run "Queue = 'ChangeRequest' AND Status
!= 'Closed'  AND Starts > 'midnight Sunday before last' ", it returns the
expected results. But when I change Starts to "'CF.{Proposed Start
Time(GMT)}'", it returns nothing.

Does 'CF.{Proposed Start Time(GMT)}' return a datetime value? Or, how can I
set Starts and Due date in scrip?

Please help on these questions, thank a lot!


Br
Vodar


On Thu, Sep 4, 2014 at 4:53 AM, Kevin Falcone 
wrote:

> On Wed, Sep 03, 2014 at 04:40:04PM +0800, Chrilly Cheng wrote:
> > Hi Alex,
> >
> > Thanks a lot for your explanation. I've done that config  to set
> > $AmbiguousDayInPast to 1, but the query still not work. I changed it a
> little
> > bit:
> >
> > Queue = 'ChangeRequest' AND (  Status = 'InProgress' Or Status =
> > 'WaitingforApproval' ) AND 'CF.{Proposed Start Time(GMT)}' > 'midnight
> Sunday'
> > AND 'CF.{Proposed Start Time(GMT)}' < 'midnight next Sunday'
> >
> > This query needs to be executed every Wednesday to send out dashboard
> report.
> > It will search for tickets whose "Proposed Start Time" is between last
> Sunday
> > and this Sunday.
> >
> >  And unfortunately, I cant find any log about this query. I'm using it
> on the
> > New Search page, does there have any other way to test query?
> >
>
> A few things
>
> Your use of GMT in the CF name is... misleading, since Fields are set
> in the User's Time Zone, this may not work out as you intend.
> Additionally, relative dates are going to be calculated in the user's
> time zone.  This means "midnight next sunday" will *actually* be
> 2014-09-07 04:00:00 when it goes and looks in the DB (since I'm four
> hours behind GMT).  Keep in mind also, did you mean Midnight at the
> start of sunday or midnight at the end of sunday?
>
> You can get exact parsing of the query by running code on the command
> line.  Save this in a file and run it.
>
> use lib '/opt/rt4/lib/';
> use RT -init;
>
> my $t = RT::Tickets->new(RT->SystemUser);
> $t->FromSQL("Your Query");
> warn $t->BuildSelectQuery;
>
> -kevin
>
> --
> RT Training - Boston, September 9-10
> http://bestpractical.com/training
>
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] Problem in searching date

2014-09-03 Thread Chrilly Cheng
Hi Alex,

Thanks a lot for your explanation. I've done that config  to set
$AmbiguousDayInPast
to 1, but the query still not work. I changed it a little bit:

Queue = 'ChangeRequest' AND (  Status = 'InProgress' Or Status =
'WaitingforApproval' ) AND 'CF.{Proposed Start Time(GMT)}' > 'midnight
Sunday' AND 'CF.{Proposed Start Time(GMT)}' < 'midnight next Sunday'

This query needs to be executed every Wednesday to send out dashboard
report. It will search for tickets whose "Proposed Start Time" is between
last Sunday and this Sunday.

 And unfortunately, I cant find any log about this query. I'm using it on
the New Search page, does there have any other way to test query?

Many Thanks!

Br
Vodar


On Tue, Sep 2, 2014 at 7:43 PM, Alex Peters  wrote:

> Your first debug line indicates that "Sunday" alone is not being parsed
> into a meaningful time value.  This can be corrected by setting RT config
> option $AmbiguousDayInPast to 1.
>
> Your second debug line indicates that "last Sunday" is resolving to the
> immediately previous Sunday, not the Sunday before the immediately previous
> Sunday (which I suspect you want).  The Examples section of the
> documentation for the most recent version (2013.1113 right now) of
> Time::ParseDate[1] lists "Sunday before last" as valid input.  This might
> come closer to achieving your desired outcome.
>
> These times will not resolve to a date boundary, like midnight—they will
> have the correct day, but use the current time.  This is probably not what
> you want.  Consider prefixing "midnight" to each of your search values,
> i.e. "midnight Sunday" and "midnight Sunday before last".
>
> If you can't get the search to work as desired, you could simplify the
> search to return matches between the current time and "1 week ago" and run
> it weekly at midnight on Sunday via a dashboard email subscription.
>
> [1] https://metacpan.org/pod/Time::ParseDate#EXAMPLES
>
>
> On 2 September 2014 21:27, Chrilly Cheng  wrote:
>
>> Hi Alex,
>>
>> Thanks for replying.
>>
>> I found logs below, but no more details about it.
>>
>> [Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
>> 'Sunday' 0 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
>> [Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
>> 'last Sunday' 1409482532 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
>> [Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
>> 'Sunday' 0 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
>> [Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
>> 'last Sunday' 1409482532 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
>>
>> And thanks for your reminding, I'm also aware of this, but our manager
>> prefer that label, which is hard to config with the built-in attribute in
>> RT.
>>
>>
>> Br
>> Vodar
>>
>>
>> On Tue, Sep 2, 2014 at 6:35 PM, Alex Peters  wrote:
>>
>>> What does the debug log say when you run the search?
>>>
>>> There are some config options relevant to relative dates, but it's worth
>>> verifying first that the two dates are being parsed at all.
>>>
>>> P.S.  I believe that the built-in Starts ticket attribute is intended to
>>> function as a proposed start time.
>>> On 02/09/2014 8:25 pm, "Chrilly Cheng"  wrote:
>>>
>>>>  Do I need to do any setting of the week on server?
>>>>
>>>>
>>>> On Tue, Sep 2, 2014 at 3:59 PM, Chrilly Cheng 
>>>> wrote:
>>>>
>>>>> Hi Guys,
>>>>>
>>>>> I was trying to create a qeury which returns all open tickets whose
>>>>> "Proposed Start Date" are in this week, from specific queue. I tried with
>>>>> some build-in variables in searching as showing below:
>>>>>
>>>>> Queue = 'ChangeRequest' AND (  Status != 'rejected' AND Status !=
>>>>> 'resolved' ) AND 'CF.{Proposed Start Time}' > 'last Sunday' AND
>>>>> 'CF.{Proposed Start Time}' < 'Sunday'
>>>>>
>>>>> but this query returns nothing. BTW, "Proposed Start Time" is a
>>>>> datetime custom field applied to this queue.
>>>>>
>>>>> Can you please help to check on this, see whether it doesn't work?
>>>>> Many thanks.
>>>>>
>>>>>
>>>>> Br
>>>>> Vodar
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> RT Training - Boston, September 9-10
>>>> http://bestpractical.com/training
>>>>
>>>
>>
>
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] Problem in searching date

2014-09-02 Thread Chrilly Cheng
Hi Alex,

Thanks for replying.

I found logs below, but no more details about it.

[Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
'Sunday' 0 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
[Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
'last Sunday' 1409482532 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
[Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
'Sunday' 0 (/usr/share/request-tracker4/lib/RT/Date.pm:222)
[Tue Sep  2 10:55:32 2014] [debug]: RT::Date used Time::ParseDate to make
'last Sunday' 1409482532 (/usr/share/request-tracker4/lib/RT/Date.pm:222)

And thanks for your reminding, I'm also aware of this, but our manager
prefer that label, which is hard to config with the built-in attribute in
RT.


Br
Vodar


On Tue, Sep 2, 2014 at 6:35 PM, Alex Peters  wrote:

> What does the debug log say when you run the search?
>
> There are some config options relevant to relative dates, but it's worth
> verifying first that the two dates are being parsed at all.
>
> P.S.  I believe that the built-in Starts ticket attribute is intended to
> function as a proposed start time.
> On 02/09/2014 8:25 pm, "Chrilly Cheng"  wrote:
>
>> Do I need to do any setting of the week on server?
>>
>>
>> On Tue, Sep 2, 2014 at 3:59 PM, Chrilly Cheng  wrote:
>>
>>> Hi Guys,
>>>
>>> I was trying to create a qeury which returns all open tickets whose
>>> "Proposed Start Date" are in this week, from specific queue. I tried with
>>> some build-in variables in searching as showing below:
>>>
>>> Queue = 'ChangeRequest' AND (  Status != 'rejected' AND Status !=
>>> 'resolved' ) AND 'CF.{Proposed Start Time}' > 'last Sunday' AND
>>> 'CF.{Proposed Start Time}' < 'Sunday'
>>>
>>> but this query returns nothing. BTW, "Proposed Start Time" is a
>>> datetime custom field applied to this queue.
>>>
>>> Can you please help to check on this, see whether it doesn't work? Many
>>> thanks.
>>>
>>>
>>> Br
>>> Vodar
>>>
>>>
>>>
>>
>> --
>> RT Training - Boston, September 9-10
>> http://bestpractical.com/training
>>
>
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] Problem in searching date

2014-09-02 Thread Chrilly Cheng
Do I need to do any setting of the week on server?


On Tue, Sep 2, 2014 at 3:59 PM, Chrilly Cheng  wrote:

> Hi Guys,
>
> I was trying to create a qeury which returns all open tickets whose
> "Proposed Start Date" are in this week, from specific queue. I tried with
> some build-in variables in searching as showing below:
>
> Queue = 'ChangeRequest' AND (  Status != 'rejected' AND Status !=
> 'resolved' ) AND 'CF.{Proposed Start Time}' > 'last Sunday' AND
> 'CF.{Proposed Start Time}' < 'Sunday'
>
> but this query returns nothing. BTW, "Proposed Start Time" is a datetime
> custom field applied to this queue.
>
> Can you please help to check on this, see whether it doesn't work? Many
> thanks.
>
>
> Br
> Vodar
>
>
>
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] Problem in querying date of one week.

2014-09-02 Thread Chrilly Cheng
Hi Guys,

I was trying to create a qeury which returns all open tickets whose
"Proposed Start Date" are in this week, from specific queue. I tried with
some build-in variables in searching as showing below:

Queue = 'ChangeRequest' AND (  Status != 'rejected' AND Status !=
'resolved' ) AND 'CF.{Proposed Start Time}' > 'last Sunday' AND
'CF.{Proposed Start Time}' < 'Sunday'

but this query returns nothing.  BTW, "Proposed Start Time" is a datetime
custom field applied to this queue.

Can anyone please help to check on this, see whether it doesn't work? Many
thanks.


Br
Vodar
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] error when replace bpslogo.png file

2013-08-08 Thread Chrilly Cheng
Sorry, I didn't notice that function when I was searching to replace png
file in RT location. Thanks for warning me that. I've changed it back.

Now I can set my logo from Tools->Configuration->Tools->Theme, thanks again
for your help.


On Thu, Aug 8, 2013 at 10:34 PM, Kevin Falcone wrote:

> On Thu, Aug 08, 2013 at 03:26:13PM +0800, Chrilly Cheng wrote:
> >Hi All,
> >I've got an error when I tried to replace the default bpslogo.png
> file with a new one of the
> >same name in RT(/usr/share/request-tracker4/html/NoAuth/images). The
> error log shows as below:
>
> Instead of replacing our logo (which goes with our copyright) why not
> use the Theme Editor we provide to add your own logo to the upper
> righthand corner?
>
> -kevin
>
> >[error]: '<&' without matching '&>' at
> >/usr/share/request-tracker4/html/NoAuth/images/bpslogo.png line 32
> >(/usr/share/request-tracker4/lib/RT/Interface/Web/Handler.pm:209)
> >On line 209 of Handler.pm file, it is:
> >sub HTML::Mason::Exception::as_rt_error {
> >my ($self) = @_;
> >$RT::Logger->error( $self->full_message ); #line 209
> >return "An internal RT error has occurred. Your administrator can
> find more details in RT's
> >log files.";
> >}
> >I checked the Hander.pm file but cant figure out anything. Please
> help.
> >BTW, my RT version is 4.0.7
>



-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


[rt-users] error when replace bpslogo.png file

2013-08-08 Thread Chrilly Cheng
Hi All,

I've got an error when I tried to replace the default bpslogo.png file with
a new one of the same name in
RT(/usr/share/request-tracker4/html/NoAuth/images).  The error log shows as
below:

[error]: '<&' without matching '&>' at
/usr/share/request-tracker4/html/NoAuth/images/bpslogo.png line 32
(/usr/share/request-tracker4/lib/RT/Interface/Web/Handler.pm:209)

On line 209 of Handler.pm file, it is:

sub HTML::Mason::Exception::as_rt_error {
my ($self) = @_;
$RT::Logger->error( $self->full_message ); #line 209
return "An internal RT error has occurred.  Your administrator can
find more details in RT's log files.";
}

I checked the Hander.pm file but cant figure out anything. Please help.

BTW, my RT version is 4.0.7

-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


Re: [rt-users] [4.0.7][Debian]Quick search in homepage doesn't show ticket amount

2013-08-07 Thread Chrilly Cheng
Thanks a lot, Kevin. This issue is fixed according to your solution.
And I've noticed that warning info and fixed it also. Sincere thanks for
your help.

Br
Vodar

On Thu, Aug 8, 2013 at 1:55 AM, Kevin Falcone wrote:

> On Wed, Aug 07, 2013 at 01:20:35PM +0800, Chrilly Cheng wrote:
> >Thanks for your reply. I've test my custom lifecycle in RT web ui, it
> works fine.
> >For your concern, i paste my lifecycle code at below, please help to
> check it, thanks a lot!
>
> Thanks for sending along the LifeCycle config.  It points out a
> regression introduced in 4.0.13.  We've merged a fix for it and you
> can grab the commit from here and apply it:
>
> details
>
> https://github.com/bestpractical/rt/commit/5a5579867ae459ce3c55571450a501220ba9b3a8
>
> You can
> wget
>
> https://github.com/bestpractical/rt/commit/5a5579867ae459ce3c55571450a501220ba9b3a8.patch
> cd /opt/rt4
> patch -p1 < 5a5579867ae459ce3c55571450a501220ba9b3a8.patch
>
> when 4.0.18 ships, it'll have a fix for it.
>
> Also, you should fix the warnings that RT logs when starting up about
> errors in your lifecycle.
>
> [warning]: Nonexistant status closed,rejected in right transition in
> crmcase lifecycle
> [warning]: Nonexistant status inprogess in action in crmcase lifecycle
>
> -kevin
>



-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


Re: [rt-users] [4.0.7][Debian]Quick search in homepage doesn't show ticket amount

2013-08-06 Thread Chrilly Cheng
Hi Kevin,

Thanks for your reply. I've test my custom lifecycle in RT web ui, it works
fine.

For your concern, i paste my lifecycle code at below, please help to check
it, thanks a lot!

File location: /etc/request-tracker4/RT_SiteConfig.pm

Set(%Lifecycles,

# modify the default lifecycle
crmcase => {
# All the appropriate ticket statuses
initial => [ 'NeedAction' ],
active  => [ 'InProgress','WaitingforCustomer',
'WaitingforVendor', 'WaitingforLaunch', 'Monitoring' ],
inactive=> [ 'Closed','Rejected' ],

# Default ticket statuses for certain actions
defaults => {
on_create => 'NeedAction',
},

# Status change restrictions
transitions => {
'NeedAction'  => [qw(InProgress Rejected)],
'InProgress'   => [qw(WaitingforCustomer WaitingforVendor
WaitingforLaunch NeedAction Monitoring Rejected Closed)],
'WaitingforCustomer'   => [qw(InProgress Rejected)],
'WaitingforVendor'   => [qw(InProgress Rejected)],
'WaitingforLaunch'   => [qw(InProgress Rejected)],
'Monitoring'   => [qw(InProgress Closed)],
'Closed'  => [qw(NeedAction)],
'Rejected' => [qw(NeedAction)],
},

# Rights for different actions
rights => {

# These rights are in the default lifecycle
'* -> Monitoring'   => 'Monitoring Case',
'Closed,Rejected -> *'=> 'Reopen Case',
'* -> Rejected' => 'Reject Case',

},

# Actions for the web UI
actions => [
'NeedAction -> InProgess' => {
label  => 'Accept Case',
update => 'Comment',
},
'InProgress -> WaitingforCustomer' => {
label  => 'Waiting for Customer',
update => 'Comment',
},
'InProgress -> WaitingforVendor' => {
label  => 'Waiting for Vendor',
update => 'Comment',
},
'InProgress -> WaitingforLaunch' => {
label  => 'Waiting for Launch',
update => 'Comment',
},
'InProgress -> Monitoring' => {
label  => 'Start Monitoring',
update => 'Comment',
},
'WaitingforCustomer -> InProgress' => {
label  => 'Receive from Customer',
update => 'Comment',
},
'WaitingforVendor -> InProgress' => {
label  => 'Receive from Vendor',
update => 'Comment',
},
'WaitingforLaunch -> InProgress' => {
label  => 'Ready for Launch',
update => 'Comment',
},
'InProgress -> NeedAction' => {
label  => 'Reassign Case',
update => 'Comment',
},
'Monitoring -> Closed' => {
label  => 'Close Case',
update => 'Comment',
},
'Closed -> NeedAction' => {
label  => 'Reopen Case',
update => 'Comment',
},
'* -> Rejected' => {
label  => 'Reject',
update => 'Comment',
},
'Rejected -> NeedAction' => {
label  => 'NeedAction',
update => 'Comment',
},
],
},

# Status mapping different different lifecycles
);

Any comments of this?


On Tue, Aug 6, 2013 at 10:57 PM, Kevin Falcone wrote:

> On Tue, Aug 06, 2013 at 09:21:12PM +0800, Chrilly Cheng wrote:
> >Hi All,
> >I encountered this issue when i was trying to setup RT on a new
> server.
> >I've created a Lifecycle in RT_SiteConfig.pm file:
> >Set(%Lifecycles,
> >cyclename => {
> >...
> >},
> >);
> >All queues i created are using this lifecycle, even the default
> queue. But after i configured
> >and tested ticket lifecycle, i found out Quick search component shows
> none ticket amount of
> >all those queues.
> >I tried to creat a new queue with approvals lifecycle, the ticket
> amount of all status do
> >show. Then i tried to clear the mason data, replaced those
> Quicksearch,
>
> This implies that your custom lifecycle is not correct.
> However, you didn't show your lifecycle, so that's just a guess.
>
> -kevin
>
> >QueueSummaryByLifecycle QueueSummaryByStatus files in
> >/usr/share/request-tracker4/html/Elements, it turned out to make no
> sense at all.
> >I'm so frustrated on this, somebody please help. Any comments or
> ideas would be great
> >appreciated. Thanks all.
>



-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


[rt-users] [4.0.7][Debian]Quick search in homepage doesn't show ticket amount

2013-08-06 Thread Chrilly Cheng
Hi All,

I encountered this issue when i was trying to setup RT on a new server.
I've created a Lifecycle in RT_SiteConfig.pm file:
Set(%Lifecycles,
cyclename => {
...
},
);

All queues i created are using this lifecycle, even the default queue. But
after i configured and tested ticket lifecycle, i found out Quick search
component shows none ticket amount of all those queues.
I tried to creat a new queue with approvals lifecycle, the ticket amount of
all status do show. Then i tried to clear the mason data, replaced those
Quicksearch, QueueSummaryByLifecycle QueueSummaryByStatus files in
/usr/share/request-tracker4/html/Elements, it turned out to make no sense
at all.

I'm so frustrated on this, somebody please help. Any comments or ideas
would be great appreciated. Thanks all.

-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


[rt-users] How to get Custom Field's description which setted by ExternalValues subroutine

2013-05-21 Thread Chrilly Cheng
Hi All,

I've got a problem with the Custom Field description issue. I created a
custom field named Contact, and when a new ticket is created, I use scrip
to add this Contact user to Requestor list.
I remember that when we set the ExternalValues with code below, we would
pass a description to RT
sub ExternalValues {
..
..
push @res, {
name=> $element->{'cont_name'},
description => $element->{'cont_email'},
sortorder   => $i++,
};
..
}

So i want to use this "description" value to create user or add to mail
list. Can anyone tell me how to get it?

I used code as listed below, but what i got is just the Description value
of this Custom Field, NOT the description of the custom field value I
passed in config file.

my $CF = new RT::CustomField($RT::SystemUser);
$CF->LoadByName( Queue => $ticket->QueueObj->id, Name => $CFName );
$Email = $CF->Description();

Any suggestions would be help, thanks a lot.

-- 
*Br*
*Vodar*
*It's not where you start -- it's where you finish that count.*


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training