I'm not sure I understand the requirement here, but it's pretty straightforward to set the status with groovy. You use it to execute the transitions required to get you into the correct status.
I've got https://jamieechlin.atlassian.net/wiki/display/GRV/Services bookmarked for the basic code for pushing an issue through a transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.