Re: [rt-users] How can I get the value from a custom field from the command line

2012-09-14 Thread Hans Vos | Drecomm

  
  
Hello,
  
  I have found that you can set the custom field value for a ticket
  with the following command:
  
  rt edit -t ticket [ID] set CF-[ID]='value'
  
  Where the first ID is the ticket number and second ID is the
  number of the custom field.
  
  However you cannot use the same syntax to retrieve the value,
  like:
  
  rt show -t ticket -f CF-[ID] [ID]
  
  Where the first ID is the number of the custom field and the
  second ID is the ticket number.
  
  However, it does work when you use the custom field name instead
  of the ID, like:
  
  rt show -t ticket -f CF-[Name] [ID]
  
  Is this a bug?
  
  --
  

  
Met vriendelijke groet / Best regards,
  
  Hans Vos
  
  System Administrator
  
  
 
  

  

  
E h@drecomm.nl
T 050-577 5822
  
   

  

  
  
 
  
Vestiging Groningen

  

  Hoendiep

208
  T +31 (0)50 577 58 22
  Bekijk onze actuele
  projecten


  9745

ED Groningen
  F +31 (0)50 577 58 23
  www.drecomm.nl
  

  

  
  
 

  
  
  Op 12-9-2012 22:30, Hans Vos schreef:


  
  Hello,
  
  I am trying to get the value of a custom field from a specified
  user.
  
  I can get the normal details with the command "rt show user/22".
  
  But I would like to retrieve the current value (or lack thereof)
  of a custom field that I created (simple text field). How can I do
  this?
  
  If this is not possible using the API is there perhaps another
  way? I tried getting directly from the database. The only problem
  is that when you remove the value the latest value is still
  present in the '
  
  ObjectCustomFieldValues' table. I currently have a query that gets
  the latest value from this table.
  
  --
  Kind regards,
  
  Hans Vos

  



Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] capture status change to apply custom filed status

2012-09-14 Thread Asanka Gunasekera
Hi, how can I capture the action of opening (not the open status) a new 
ticket to apply a custom filed value to Work in progress

Thanks and regards


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Add a column to the default queue ticket listing

2012-09-14 Thread Felix Bachmann
Hi,
On RT at a glance there is the Quick search pane, which lists the
queues with number of open, new and stalled tickets. Clicking on one of
those numbers shows the list of tickets in the ques with that status. In
that listing I would like to add a column globally. Of course I can edit
that search, but I can only store it as a new search. Is there a way to
update those searches?
Many thanks
Felix


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Custom fields empty

2012-09-14 Thread Kevin Falcone
On Mon, Sep 10, 2012 at 11:34:31AM +0200, Mayk Backus wrote:
I've noticed some strange things regarding custom fields. We use a 
 documenting system called
i-doit , that has a connection to RT (provider by the builders of i-doit) 
 . This make it
possible to generate custom fields in RT that are populated with 
 information from the other
system. So far , so good.  The strange this however is, when i change some 
 things in the
fields on the i-doit part, some custom fields are empty.  The thing i 
 don't understand is, the
information is logged in the tickets with the information from the CF , 
 and in the articles
(this one's annoying that it's empty). When i look closer at the article, 
 i see all the
information inside the article, but not displaying in the CF's.
This is normal behavior , is there perhaps a workaround for this ? I know 
 it's a third party
app that's probably screwing this up...

Have you reached out to i-doit?  Unfortunately, the extension was
developed by i-doit so I'm not sure who actually has the source code
to triage the problem.

The usual questions about 'logging on debug, what do you see' apply

-kevin


pgpyYgU4Lljth.pgp
Description: PGP signature


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] ExternalAuth LDAP authenticating more than 1 group

2012-09-14 Thread Kevin Falcone
On Mon, Sep 10, 2012 at 11:06:55AM -0400, Mike Johnson wrote:
When defining an LDAP service for ExternalAuth, you are allowed to set the 
 group that a user
has to be a member of to authenticate to RT.
We have a need to have 2 different groups authenticate.
I think I could copy my LDAP service config, rename it, change the group, 
 and then add it to
the ExternalAuthPriority list, but is there a more elegant way of doing it 
 all within 1 LDAP
service definition?

Unless you can come up with an ldap searches that match both group
memberships, the solution you describe is the easiest.

Some people use perl variables to share config options across multiple
configs, but that can sometimes just obfuscate things.

-kevin


pgpDV2GLIChra.pgp
Description: PGP signature


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Scrips being executed twice for a simple CF update

2012-09-14 Thread Kevin Falcone
On Mon, Sep 10, 2012 at 04:57:33PM -0400, Jeff Blaine wrote:
 Upon modification of one of our custom fields (text area),
 we want to parse the data, perform a translation on the
 original data, and store the results in the custom field.
 With loads of RT::Logger debugging in place, everything appears
 to be working fine except for the for the fact that the Scrip
 is being called twice, and it's performing the change ... then
 UNDOING IT:

I suspect you're running into the processing order of updates on the
Basics page. You can try making the Scrip TransactionBatch and see if
that resolves it.

Keep in mind that TransactionCreate scrips don't see all the updates
done on that page at once, it sees them piecemeal.

-kevin

 Sep 10 16:24:39 rtdev2 RT: START SCRIP processing OurField
 Sep 10 16:24:39 rtdev2 RT: OurField changed: OLD '' NEW '26 34'
 Sep 10 16:24:39 rtdev2 RT: OurField: In main chunk
 Sep 10 16:24:39 rtdev2 RT: OurField: 2 values found
 Sep 10 16:24:39 rtdev2 RT: OurField: Processing: '26'
 Sep 10 16:24:39 rtdev2 RT: OurField: Processing: '34'
 Sep 10 16:24:39 rtdev2 RT: OurField: Final string: 'X Y'
 Sep 10 16:24:39 rtdev2 RT: OurField reached final return 1
 Sep 10 16:24:39 rtdev2 RT: START SCRIP processing OurField
 Sep 10 16:24:39 rtdev2 RT: OurField changed: OLD 'X Y' NEW ''
 Sep 10 16:24:39 rtdev2 RT: OurField: In main chunk
 Sep 10 16:24:39 rtdev2 RT: OurField: 0 values found
 Sep 10 16:24:39 rtdev2 RT: OurField: Final string empty, so clearing
 out OurField entirely
 Sep 10 16:24:39 rtdev2 RT: OurField reached final return 1


pgp3tUbSPSP9V.pgp
Description: PGP signature


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Notify user from scrip about missing field

2012-09-14 Thread Jack Zabolotnyi
Hi.

Is there any way to notify user from scrip about missing fields? I'm
looking for something similar to RT's behaviour if mandatory field's value
is missing (RT reports an error and doesn't accept transaction) but to be
triggered from scrip.

Thanks in avance.

-- 
Jack Zabolotnyi
Arces Network, LLC

e: jzabolot...@arces.net
w: http://www.arces.net

PGP key: 2048R/7F2AB658 2012-07-02
PGP fingerprint: 4C7E 00A8 5210 F3D9 0509  C70E 87C8 666E 7F2A B658


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Using non-standard status only

2012-09-14 Thread Kevin Falcone
On Wed, Sep 12, 2012 at 09:53:23PM -0700, Kenneth Crocker wrote:
Although you could change those status values, why? If a ticket is 
 invoiced or whatever, it is
still open. Why not create a Custom Field that shows what its state 
 within the open status,
ie. invoiced, check pending and a ton of others. This CF could also be 
 used in queries,
dashboards, etc. You can write scrips using them. There really is no need 
 to change those
values when a Custom Field could be used. I mean you can, but if you 
 change the configured
values, you might run the risk of having to change other things as well. 
 The Custom Fields
allow you to make changes within the vanilla design.

Kenn - with RT4 and the introduction of Lifecycles, changing the vanilla
status configuration is much much easier than it was in 3.8. We make use of
several Lifecycle configurations that do not use open/stalled/resolved
within BestPractical and we find them tremendously useful.

You can read more about Lifecycles at:
http://bestpractical.com/rt/docs/latest/RT_Config.html#Lifecycles

-kevin

On Wed, Sep 12, 2012 at 12:57 AM, Maciej Dobrzanski 
 [1]reg.bestpracti...@posterus.com wrote:
 
  Hello,
 
  I want to use custom lifecycles for various queues. The thing I've been
  wondering about is about some of the standard statuses such as 'new' or
  'open'. They are referred to in a few other places besides just tickets:
 
  defaults = {
  on_create = 'new',
  on_merge = 'resolved',
  approved = 'open',
  denied = 'rejected',
  reminder_on_open = 'open',
  reminder_on_resolve = 'resolved',
  },
 
  So my question is: Does it matter at all what statuses reminders use 
 other
  than transition between the two should be allowed? For example in a 
 billing
  queue I could have 'invoiced', 'overdue', 'disputed', 'paid' and
  'cancelled', so would it break anything if I just set reminders to use


pgpuPQJoMDkgp.pgp
Description: PGP signature


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] How can I get the value from a custom field from the command line

2012-09-14 Thread Thomas Sibley
On 09/14/2012 12:03 AM, Hans Vos | Drecomm wrote:
 I have found that you can set the custom field value for a ticket with
 the following command:
 
 rt edit -t ticket [ID] set CF-[ID]='value'
 
 Where the first ID is the ticket number and second ID is the number of
 the custom field.

You can use the CF Name instead of ID just fine above.  If it contains
any special characters, you'll need to use CF.{Name Here} syntax, and of
course quote it properly for your shell.

Names are preferred to IDs in almost all cases of user interaction.

 However you cannot use the same syntax to retrieve the value, like:
 
 rt show -t ticket -f CF-[ID] [ID]

You're not expected to know CF numeric IDs, so no, this doesn't work.

 However, it does work when you use the custom field name instead of the
 ID, like:
 
 rt show -t ticket -f CF-[Name] [ID]
 
 Is this a bug?

No.



Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Add incremental time worked in a scrip

2012-09-14 Thread Kevin Falcone
On Thu, Sep 13, 2012 at 07:24:38AM +0200, Robert Wysocki wrote:
 Dnia 2012-09-11, wto o godzinie 17:51 +0200, Maciej Dobrzanski pisze:
  Gary,
  
  ➢ I bet this is really easy, but I'm stumped. The wiki didn't help me 
  either.
  
  If you want to associate times with comments, you need to make sure
  they are stored inside the corresponding transactions. However
  transaction objects are immutable, so you probably can't modify them
  from Scrips. I think you will need to intercept a callback in ticket
  update and update ticket parameters (UpdateTimeWorked) before they
  enter the RT core.
 
 I think TransactionBatch scrips are meant to do that.

TransactionBatch scrips just run after all the transactions in an
update are done, they don't have to do with changing transactions.
Also, the TransactionBatch scrip would require you to iterate through
all the related transactions to find the right one to update, while
the On Correspond scrip living in TransactionCreate would get the
right transaction automatically.

As noted by Maciej - far and away the easiest thing is to use a
callback or some JS to insert a default into the UpdateTimeWorked on
Update.html.  You can do it from a Scrip, but you have to use a hammer
to update the Transactions.

-kevin


pgpNj5zvhfBdb.pgp
Description: PGP signature


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Any way to disable cross-site request forgery ?

2012-09-14 Thread Ethier, Michael
Hi,

We have a RT 4.0.7 instance setup that can be accessed by 2 different urls.
With one url we get this message:

RT has detected a possible cross-site request forgery for this
request, because the Referrer header supplied by your browser
(prodrt.rcs.fas.harvard.edu:443) is not allowed by RT's configured
hostname (prodrt.fas.harvard.edu:443). This is possibly caused by a
malicious attacker trying to perform actions against RT on your
behalf. If you did not initiate this request, then you should alert
your security team.

The other url path we don't. This is annoying to some of the people using RT.
Is there any way to disabled these warnings ? This didn't exist in an earlier
version of RT we were running (v3.8.8).

Thanks,
Mike



Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Any way to disable cross-site request forgery ?

2012-09-14 Thread Thomas Sibley
On 09/14/2012 12:37 PM, Ethier, Michael wrote:
 Is there any way to disabled these warnings ? This didn’t exist in an
 earlier version of RT we were running (v3.8.8).

http://bestpractical.com/rt/docs/4.0/RT_Config.html#ReferrerWhitelist



Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] How to have RT send email as a group (not individually) ?

2012-09-14 Thread Ethier, Michael
Hello,

We would like RT to send email such that all the requestors and cc's are 
included on one email.
Right now it appears RT sends and email to each individual separately, 
consequently people don't know
If others received RT's email.

Is there a way to configure RT such that everyone involved in a ticket is 
included in 1 email ?

Thanks,
Mike


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs