Changing priority upon closing ticket with certain condition

Everytime we close a ticket with certain coditions (a certain closing reason) or being in certain group, we need to set the priority of that ticket to certain priority (4 in this case)

Many times technicians forget to change that priority so this affect ticket quality.

How can i set a condition or program HP SM so i we can do this priority change automatically every time a ticket is closed upon those parameters?

Thank  you!