Zenity quick ticket script

From Request Tracker Wiki
Revision as of 16:39, 6 April 2016 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

With this script you can easily create a ticket say with a click on Your taskbar in gnome.

You can enter a subject and comment on it.

I handy tool for unplanned interruptions when working with the Pomodoro Technique.

#!/bin/bash

#Unplanned not urgent interruptions:
inp=$(zenity --entry --title="Note" --width=80 --text="Type subject...");
if [ "$inp" = "" ]; then
        echo no input - exiting
        exit
else
        ticket=$(rt create -t ticket set Subject="Unplanned,NotUrgent: $inp" set Queue=Diverse set Priority=0|awk '{print $3}')
        echo $ticket
 fi
zenity --question --text="You want to add additional comment to ticket?"
if [ "$?" -eq 0 ]; then
        inp=$(zenity --entry --title=Comment on ticket" --width=80 --text="Please enter comment");
        if [ "$inp" = "" ]; then
                exit
        fi
        rt comment -m "$inp" $ticket
else
exit
fi