Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[resolved] CHANGE VALUE OF PRIORITY FIELD AND HOW TO USE CUSTOM FORM

RioRio
edited June 2016 in Mods and Customizations
Hi Team,

Currently the dynamic list only allows me to choose the option low normal high and emergency.
osTicket Versionv1.9.12 (19292ad)
Up to date
Web Server SoftwareMicrosoft-IIS/8.5
MySQL Version5.7.3
PHP Version5.5.11
Please Help:
1. I want to change it to Low Medium High and remove the emergency but its a dynamic field i cannot delete it on the built-in forms and add my custom list
2. I have tried creating a custom form but i dont know how to set it as a default form when creating a ticket. How do i do it?


Thanks,
Reuben



Comments

  • What happens if you just change the word Emergency to High in the database?  It is in ticket_priority.  If you have old records you want to update you'd have to do that in SQL.  If you remove Emergency from the table, it might give you orphan records, so test before you delete and/or update.  If you don't remove Emergency or just keep it, you'd have two High entries.

    I think the actual function is here if you want to edit something else (class.forms.php).  There's lots of other places that have priority though.  This one is for the form.  The other just pull from the table as well.  Also look at class.priority.php.

        function getChoices($verbose=false) {
            $sql = 'SELECT priority_id, priority_desc FROM '.PRIORITY_TABLE
                  .' ORDER BY priority_urgency DESC';
            $choices = array('' => '— '.__('Default').' —');
            if (!($res = db_query($sql)))
                return $choices;

            while ($row = db_fetch_row($res))
                $choices[$row[0]] = $row[1];
            return $choices;
        }


  • You cannot edit this from from within the ui.
    You would have to edit the ost_ticket_priority table
  • RioRio
    edited June 2016
    Hi Buck_Rogers thanks for the info...

    Hi Ntozier,

    So here is what i got. Any impact on the whole program or other page if i change this? Please kindly let me know.

    More likely the new settings would be

    Low          3
    Medium    2
    High         1

    Image Here:
    image




    Thanks,
    Reuben
  • Hypothetically if you remove some it wont break anything... but if you try to use email priority to osTicket priority obv anything over 3 would fail..  I dont know if it would fail detrimentally or if it would just break on display.
  • RioRio
    edited June 2016
    Thanks Ntozier.. I have change it according to our requirements...we will monitor from here. You can close the thread.


  • @Rio please let me know if you find anything wonky of bad from this change. :)
This discussion has been closed.