Help Desk Software & Beyond
May 22, 2012, 12:32:39 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [REQ] Default ticket status upon submission.  (Read 4008 times)
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« on: March 28, 2008, 02:18:33 PM »

Hello,

Is there a way to specify the status of a ticket .... within the html template ... for example .... for tracking and reporting purposes we are asking our reps to track all offline activites .... for this I have created a new template, which works prefectly ...however I would like the status to be "closed" after the rep submits the "ticket" 

I'm thinking that I need something along these lines ......

<input type=hidden name=status value='(WFR)'> <--- what should the value be?

Thank you in advance
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: March 28, 2008, 04:38:30 PM »

I'm not too sure you can set the status upon new ticket creation.  By default the status is PND OPN and then the ticket must be claimed.

When you create a ticket, you invoke the "newticket" subroutine.

When you manipulate a ticket, respond to a ticket, etc... you invoke the "ticket" subroutine.

What you propose by submitting a hidden field along with the form is a good idea but I don't think it will work at all.

You'd need to do some modifications to the TTXTicket.pm module.

I'm going to move this thread to the Mod forum.
« Last Edit: March 28, 2008, 05:44:13 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #2 on: March 28, 2008, 05:26:09 PM »

<input type="hidden" name="status" value="CLS">


Well Arvin...

I wrote a line to read your hidden field into a new variable in the newticket subroutine called $closer.

Quote
my $closer = $query->param('status');

Then later in the newticket subroutine, I check to see if you have that variable and set the new ticket's status to CLS (solved).

Quote
if ($closer eq 'CLS'){
     $ticket->{status} = 'CLS';
  }

Then if the ticket is closed, set the solved date/time stamp...

Quote
if ($ticket->{status} eq 'CLS') {
        $ticket->{updated} = time();
        $ticket->{closed} = $ticket->{updated};
      }

Of course since TTX always allows both operators and non-operators to submit new tickets, your reports would not pick up any of these new tickets.  That's because the Reports module only looks at tickets closed by operators.

Regardless, this whole modification did not work at all... Undecided

Why?  Because when an operator claims a ticket, the status is always set to OPN (open) in the claim subroutine.   Cheesy

Quote
$t->{status} = 'OPN';


Oh well, I gave it a shot but this will never work without major code changes covering several subroutines in several modules which will undoubtedly lead to other conflicts.
« Last Edit: March 28, 2008, 05:28:28 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #3 on: March 31, 2008, 10:25:53 AM »

I just read this .... Wow! ....

Thank you for trying it out Sparky!

Logged
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #4 on: November 24, 2009, 08:51:55 AM »

Hey Sparky

This might work for us.  Does your code actually change the status?  (but when the ticket is claimed it changes to open?)

We have a standalone instance of TTX in a separate folder in cgi-bin that we are using to generate backup reminders.  If cutomers don't respond to the reminders in a day or so we follow it up.  When they respond we simply delete them.

Using mail module. 

It works like this - script from cron sends "backup reminder" mail to TTX with from: as Customer and to: as reminder@ttx.  TTX then generates a new ticket notification and sends it to the from: address (the customer).  It creates a PND entry in the Ticket Browser colored Blue.   When the Customer has swapped backup media they reply to the ticket notification but the status remains PND and thus blue in the Ticket Browser.

If we could set the default status of the new ticket to, say, WFR - then we can color the WFR text GREEN and when the customer replys the status will change to OPN (or PND?) and the text color will change.  This would give us a visual indicator of which alerts need to be followed up.

Rob
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #5 on: November 24, 2009, 09:35:45 AM »

This might work for us.  Does your code actually change the status?  (but when the ticket is claimed it changes to open?)

This little experiment was a total failure.  The mod did not change the code.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #6 on: November 24, 2009, 04:37:43 PM »

...Hmmmm.  But a variable for status is set somewhere in the ticket creation eh?

Any thoughts on when that is set?
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #7 on: November 24, 2009, 05:37:55 PM »

...Hmmmm.  But a variable for status is set somewhere in the ticket creation eh?

Any thoughts on when that is set?

Yes- but it doesn't matter because as soon as the ticket is claimed, the claim subroutine sets the status to OPN.  This was the logical flaw in the original request.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #8 on: November 24, 2009, 05:44:17 PM »

Not for us - we wouldn't claim it, we'd just delete it.  We want to use the feature in browser view that colorcodes the ticket by status.

Currently when a reply is made to a pending ticket it's status (and color) stays pending.  If we can set the status to something else at ticket creation we can set a different color.

This list is only for backup reminders.  So we just glance at the list to see if folks have replied.  If they have we delete the ticket.  If they haven't after some days we contact them direct
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #9 on: November 24, 2009, 05:52:44 PM »

I'm not entirely clear on why you are using ( or abusing  Cheesy ) the system in such a way.  However, you can try Arvin's original suggestion by trying to submit a hidden field upon ticket creation.

<input type="hidden" name="status" value="xxx">

However, xxx could only be one of the valid three letter status codes.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #10 on: November 24, 2009, 05:56:10 PM »

You use

if ($closer eq 'CLS'){
     $ticket->{status} = 'CLS';
  }

So I should just be able to insert


 $ticket->{status} = 'OPN';

somewhere in newticket sub yes?  Any idea where?
 
Logged
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #11 on: November 24, 2009, 05:58:17 PM »

...so it'll work for emailed tickets.

mailboxpro.cgi seems to have it's own ticket creation sub.  But I can tect with the ticket form to start with
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #12 on: November 24, 2009, 06:01:29 PM »

You use

if ($closer eq 'CLS'){
     $ticket->{status} = 'CLS';
  }

So I should just be able to insert


 $ticket->{status} = 'OPN';

somewhere in newticket sub yes?  Any idea where?
 

All that junk was for Arvin's specific request and a lot of time has passed since then.

I would suggest looking at the newticket subroutine for the section where statuses are set... you'll see a bunch of code similar to above.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #13 on: November 24, 2009, 06:03:16 PM »

...so it'll work for emailed tickets.

mailboxpro.cgi seems to have it's own ticket creation sub.  But I can tect with the ticket form to start with

That is not true.  Alex's code has almost zero redundancy.  I'm sure the mailboxpro module calls the same ticket creation subroutine.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
robwellesley
Jr. Member
**

Karma: 3
Posts: 53


View Profile
« Reply #14 on: November 24, 2009, 06:43:27 PM »

...Got it!!

in TTXFileTickets.pm

addticket subroutine. This line

  $tik->{status} = 'PND' if $tik->{status} eq undef;

sets the status for a new ticket
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.034 seconds with 19 queries.