Adjust the logic when filtering issues by priorities
In the database priorities are stored in tickets as integer so we cannot
query them as string directly.
The approach taken with this commit allows to filter by priority given
its rank (integer) or its label (name).
Thanks to faitout for pointing it out