So last note, I talked about the writ of mandamus and how that might a handy tool to have in your arsenal. The big problem, I said, was this concept of imperative, i.e. mandatory, duty versus discretionary.
So here’s the good news: courts are hot on justice. Believe it or not, you cynic. They see something that doesn’t work right, they get frustrated if they can’t fix it.
Turns out that discretionary has some limits on it, too. The law’s going to require the official with the discretionary duties not to be a complete ass about it. The exceptions are fairly limited, but  mandamus may be addressed to discretionary acts when an act is “`arbitrary and oppressive'” or where there has been a “`plainly palpable'” abuse of discretion. Id. (quoting Peerless Constr. Co. v. Bass, 158 Tenn. 518, 14 S.W.2d 732, 733 (1929)).
So those are the magic words. You’re going to have to prove that the government official has been arbitrary and oppressive  or that there’s been a clear abuse of discretion. Tough row to hoe, but that’s the standard, so get to work.