I have a Step in my workflow called "Shelved" with an associated transition. My team uses this to get rid of issues that we did not complete during a sprint and that we no longer intend to complete. (I don't allow the users to delete the issues, as we may want to look at them later for history). The transition also sets the resolution to "Won't Fix". This is an action that users would take after a Sprint is closed, before (or during) planning of the next Sprint.
I would like to put a condition (or verification?) on this transition so that only issues that are not assigned to an active sprint can be Shelved. I tried to do this by putting a Condition with the JQL statement "Sprint not in openSprints()" but when I did that I couldn't see the Workflow action at all either as a button (I had configured it to be the second button with "opsbar_sequence") or in the Workflow dropdown or "More Actions" menu.
Is there a way to do this?