osTicket/osTicket-1.8 — pull request #954 by torohill (2014-05-27 11:27:00+00:00)
Title: Use priority index instead of priorityId for incoming email as the dynam...

...ic field expects the input to named priority. This enables filtering of incoming emails by priority. osTicket/osTicket-1.8#499

This fix enables filtering of incoming emails by priority. Note that this only works if the 'Emailed Tickets Priority' option under Settings > Emails is turned on. If it's not turned on then tickets created from emails are assigned the default priority but that happens after the filters are processed, so no matches will happen.

Also, note that the original feature request (from the first comment) is already achievable with the 'Emailed Tickets Priority' setting, as it's just for setting priority, however you need filters to apply other actions (eg. assigning to a user).

I'm pretty sure I didn't break anything by renaming priorityId to priority in all these places, and it works in my particular case, but it may need testing for other situations.