I am building an workflow function plugin and in the configuration of it I'd like to get the step or some handle to the workflow so I can display a list of valid transitions for the current step.
In the edit screen I can do this as I get an ActionDescriptor passed to my code, but in the input function getVelocityParamsForInput(Map velocityParams) I don't get any such information and can't figure out how to get a handle to the workflow that is being currently edited, or the step of the workflow which is being edited.
Community moderators have prevented the ability to post new answers.
It does not seem to be passed in. The only way I have been able to get it is like this:
HttpServletRequest httpServletRequest = ServletActionContext.getRequest();
Thanks, that sounds promising.
I can see webwork.ServletActionContext at compile time, but not at runtime. Maybe it is because I changed it while in the debugger? Should this class be on the runtime classpath if I build/install the plugin properly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You get a class not found error at runtime? Try reploying your plugin and restarting jira.
> Should this class be on the runtime classpath if I build/install the plugin properly?
Far as I know, yes. Works for me...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get he workflow like this:
JiraWorkflow workflow = workflowManager.getWorkflow(issue);
And a step for a status like this:
StepDescriptor step = workflow.getLinkedStep(constantsManager().getStatus(status));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But you don't have any issue in the screen he's talking about, ie the one where you can set parameters for a workflow function. Unless I'm completely missing the point of the question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah I see!. getVelocityParamsForInput - I should have noticed!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.