Redirect to ticket display on quick create

Hi,

This small patch adds a config/preference to allow redirection to ticket
display on Quick ticket creation, instead of back to RT at a glance.

Ivan Kohler, President and Head Geek, Freeside Internet Services, Inc.
Open-source billing, ticketing and provisioning - http://www.freeside.biz/

QuickCreateDisplay.patch (1.83 KB)

Hi,

What’s the point? You go to ticket display to update it. So with your patch
people will start to create meaningless tickets and then fill it with data.
All notifications on create become useless.

Regards, Ruslan. From phone.2010 11 11 02:12 пользователь “Ivan Kohler” ivan-rt-devel@420.am написал:

Hi,

This small patch adds a config/preference to allow redirection to ticket
display on Quick ticket creation, instead of back to RT at a glance.


Ivan Kohler, President and Head Geek, Freeside Internet Services, Inc.
Open-source billing, ticketing and provisioning - http://www.freeside.biz/

Hi,

This small patch adds a config/preference to allow redirection to ticket
display on Quick ticket creation, instead of back to RT at a glance.

Hiya Ivan,

Thanks for the patch. With some tweaks, I’d be happy to have this in
3.9. My first round notes are inline:

— share/html/index.html 31 Dec 2009 13:14:14 -0000 1.1.1.1
+++ share/html/index.html 10 Nov 2010 23:00:16 -0000
@@ -115,7 +115,11 @@
From => $session{‘CurrentUser’}->EmailAddress,
Content => $ARGS{‘Content’},
Subject => $ARGS{‘Subject’});

  •    push @results, $msg;
    
  •    if ( $t && $t->Id && RT->Config->Get('QuickCreateDisplay', $session{'CurrentUser'}) ) {
    
  •      RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Ticket/Display.html?id=". $t->Id);
    

We’ve actually got a usefully newly generalized bit in 3.9:
/Elements/MaybeRedirectForResults

It encapsulates the logic of following up a POST with a redirect to a
GET with the right stuff in the @results hash.

  •    } else {
    
  •      push @results, $msg;
    
  •    }
    
    }
    elsif ( !$ValidCFs ) {
    push @results, "can’t quickly create ticket in queue " .
    Index: lib/RT/Config.pm
    ===================================================================
    RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT/Config.pm,v
    retrieving revision 1.5
    diff -u -r1.5 Config.pm
    — lib/RT/Config.pm 6 Jun 2010 04:22:40 -0000 1.5
    +++ lib/RT/Config.pm 10 Nov 2010 23:00:16 -0000
    @@ -313,6 +313,16 @@
    Hints => ‘Use css rules to display text monospaced and with formatting preserved, but wrap as needed. This does not work well with IE6 and you should use the previous option’, #loc
    },
    },
  • QuickCreateDisplay => {

Maybe DisplayAfterQuickCreate, as it’s a bit more descriptive.

Hi,

This small patch adds a config/preference to allow redirection to ticket
display on Quick ticket creation, instead of back to RT at a glance.

Hiya Ivan,

Thanks for the patch. With some tweaks, I’d be happy to have this in
3.9.

Attached is a patch for 3.9 that incorporates your requested changes,
and just in case, an updated patch for 3.8 too. If you need any other
tweaks, let me know.

Ivan Kohler, President and Head Geek, Freeside Internet Services, Inc.
Open-source billing, ticketing and provisioning - http://www.freeside.biz/

DisplayAfterQuickCreate.patch.3.9 (1.56 KB)

DisplayAfterQuickCreate.patch.3.8 (1.86 KB)