You can use a validation extension on the issue event. Check out the extensibility pack, validation framework training material for more information. There's a lot of documentation and some reference examples. Here's a forum post talking about the same extension point.
This example is sending an email when a spec is up issued but you would change it to check previous version statuses and prevent the up issue.
I have kept code under Workflow Action Tag to change the status of spec automatically based on condition there I am trying to keep the condition if the value is not equal then throw error by using context.errorlist.add("Message").
But the error is not coming on screen and the validation is also not happening though the condition fail the next code is working without throwing error.
Can you please tell me is that we can't throw error when we use SimpleLinearWorkflowActionBase class.If I want to throw error is that i need to write only under guard conditions tag.