[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


[rt-users] Custom Field Security

2015-08-04 Thread Joseph D. Wagner
I would like for unprivileged users to be able to enter and view custom 
fields on the tickets they enter.


I setup the custom field for Ticket and added it to a specific Queue.  I 
figured out how unprivileged users can enter custom fields for tickets 
they file -- SeeCustomField and ModifyCustomField.


However, after the ticket is entered, unprivileged users cannot see the 
custom field data they just entered on the SelfService/Display.html 
page.  Only privileged users can see this.


How can I set this up so unprivileged users can see the custom field 
data they just entered?


Any help would be appreciated.  Thanks.

Joseph D. Wagner


[rt-users] resolving stalled tickets after X amount of time

2015-08-04 Thread Mike Johnson
I tried googling and found an unanswered email to this list from 2006.

I also found a bunch of links relating to RT's Lifecycle functionality, but
I wasn't able to figure out if there was a built in way for RT to
auto-resolve/reject/(some other status) tickets that have been stalled for
a period of time.

Ideally, I would like to set tickets to stalled when we are waiting for
feedback from the requestor, and if that requestor does not respond after a
given time period(configurable by queue preferrably), the system
automatically resolves.

It would be best if when we resolve in this fashion, that the requestor
gets notified of the automatic resolve... which is why I suggested another
status, as it would be easy to set a scrip/template for this.

From what I read in the Lifecycles functionality, it only applies to
transactions as they are happening. I'm looking to kick off a transaction
automatically.

I'm assuming this is a cron + executing a saved query of some sort, then
actioning on it all.

Is this built into RT somehow, or do I have to piece it together like I've
stated above using cron/perl scripting?

Thanks!
Mike.

-- 
Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@nosm.ca


[rt-users] Pre-Populate Description

2015-08-04 Thread Joseph D. Wagner
I would like to pre-populate the description of a new ticket. For 
example, if I filed a bug on Red Hat's Bugzilla, a new bug description 
already contains the text:


Component:
Version:
Problem:
Expected Results:
Actual Results:
Additional Info:

A feature like this would be very helpful to guiding users with what 
data they should enter. Can this be done in RT? If so, how?


Thanks.

Joseph D. Wagner


Re: [rt-users] Pre-Populate Description

2015-08-04 Thread Matt Zagrabelny
On Tue, Aug 4, 2015 at 2:57 PM, Joseph D. Wagner j...@josephdwagner.info 
wrote:
 I would like to pre-populate the description of a new ticket. For example,
 if I filed a bug on Red Hat's Bugzilla, a new bug description already
 contains the text:

 Component:
 Version:
 Problem:
 Expected Results:
 Actual Results:
 Additional Info:

 A feature like this would be very helpful to guiding users with what data
 they should enter. Can this be done in RT? If so, how?

You can do this in a variety of ways. Each with their own amount of
work and with their own caveats for use-case. There are probably more
ways that I am not aware of, too.

Use Articles. This is pretty easy, but to my knowledge, the users will
have to select the article from a drop down to get the text into your
content box.

Use QuickCalls:
http://search.cpan.org/dist/RT-Extension-QuickCalls/lib/RT/Extension/QuickCalls.pm
When the user selects an entry from the quick call list, the resulting
ticket content can be populated with the article.

Here is a config snippet:

Plugin('RT::Extension::QuickCalls');

Set(
$QuickCalls,
[
{
Name = 'Elevated Rights',
Queue= 'End User Support',
Status   = 'resolved',
SetOwnerToCurrentUser= 1,
'Articles-Include-Article-Named' = 'Elevated Access Rights',
CommentContent   = q{},
},
]
);

Use a callback to add the text for the given queue. Forgive me the
pasting of code in an email. You'll get the concept.

$ cat 
html/Callbacks/RT-Site-UMN-Duluth-EducationalTechnology/Elements/MessageBox/Default
%perl
if (
(grep /^Create\.html$/, map({$_-name} $m-callers))
# ensure we are at Create.html

# AND
(
! defined $ARGS{Name}
# Name parameter is not defined
||
# OR
$ARGS{Name} ne 'CommentContent'
# Name is not CommentContent (CommentOnCreate)
)

# AND
(
# we are creating in the Educational Technology queue
(
defined $parent_args-{Queue}
# definededness check

# AND
(
# Queue matches a number and is Educational Technology id
(
# or queue does not match a number and is 'Educational
Technology'
$parent_args-{Queue} =~ /^\d+$/

$parent_args-{Queue} ==
$educational_technology_queue_id  # Normal ticket creation
)
||
(
$parent_args-{Queue} !~ /^\d+$/

$parent_args-{Queue} eq 'Educational Technology'
# Quick Create
)
)
)
||
# OR
(
defined $parent_args-{Problem}
# definededness check

# AND
$parent_args-{Problem} =~
/^$educational_technology_queue_id-/# CreateByProblemType
)
)
) {
/%perl
% $content | n %
%perl
}
/%perl
%init
my $parent_args = $m-request_args;

my $educational_technology_queue = new RT::Queue($session{CurrentUser});
$educational_technology_queue-Load('Educational Technology') || return;
my $educational_technology_queue_id = $educational_technology_queue-id;

my $content = __END_OF_CONTENT__;
What is the name of the course, its number and section (e.g., Writing
Studies 1120, section 1)?


What is the specific issue (e.g., students are reporting the quiz in
week 13 is not available)?
__END_OF_CONTENT__

$content = $m-interp-apply_escapes(
$content,
'h',
);

if (RT-Config-Get('MessageBoxRichText',  $session{CurrentUser})) {
$content = pre$content/pre;
}
/%init

-m


Re: [rt-users] resolving stalled tickets after X amount of time

2015-08-04 Thread Matt Zagrabelny
On Tue, Aug 4, 2015 at 1:41 PM, Mike Johnson mike.john...@nosm.ca wrote:
 I tried googling and found an unanswered email to this list from 2006.

 I also found a bunch of links relating to RT's Lifecycle functionality, but
 I wasn't able to figure out if there was a built in way for RT to
 auto-resolve/reject/(some other status) tickets that have been stalled for a
 period of time.

 Ideally, I would like to set tickets to stalled when we are waiting for
 feedback from the requestor, and if that requestor does not respond after a
 given time period(configurable by queue preferrably), the system
 automatically resolves.

 It would be best if when we resolve in this fashion, that the requestor gets
 notified of the automatic resolve... which is why I suggested another
 status, as it would be easy to set a scrip/template for this.

 From what I read in the Lifecycles functionality, it only applies to
 transactions as they are happening. I'm looking to kick off a transaction
 automatically.

 I'm assuming this is a cron + executing a saved query of some sort, then
 actioning on it all.

 Is this built into RT somehow, or do I have to piece it together like I've
 stated above using cron/perl scripting?

It is mostly built-in.

Here is a cron entry we use to adjust ticket status based on a query.

# Puppet Name: access_request_ticket_stale_timeout_set_status
0 12 * * * /opt/rt4/bin/rt-crontool --log=warning --search
RT::Search::FromSQL --search-arg ' Queue = Access Requests AND
Status = activated AND ( ( CF.{Renewal Verified At} IS NULL AND
Created = 410 days ago ) OR ( CF.{Renewal Verified At} IS NOT
NULL AND CF.{Renewal Verified At} = 410 days ago ) ) ' --action
RT::Action::SetStatus --action-arg stale

Let the list know if you don't have your RT cron set up; that is a
prerequisite.

-m