No. Post-functions are NOT for "judgement", they are for doing things when you have a definite set of validated data.
You should establish if your data CAN be processed in a validator and put the message in there. Or, you need to write some sort of message back into the issue so that when the user lands on the issue view screen, they get told the result
but I need do somthing when click “close” or“reopen” in a postfunction。 And then
return a message to the user according the result of the doing things.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As Bob says, you don't do this in a post-function.
If you click "close", you do one thing to the issue. If you click "reopen", you are doing something else. They go through different routes in the workflow, and that means you can put different post-functions on them to do different things. The decision about where a transition lands is made well before you reach a post function, that's too late for user interaction.
If your post-functions need to capture data and report back to the user, that's fine - they should write their information on to the issue so that results are logged.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Listen to what Nic is saying. Post functions can't provide feedback. The transition has already been done, there are no further feedback opportunities. Only validators can give feedback prior to the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a reference: Advanced Workflow Configuration
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A validator is a block of code that returns either "True" (meaning the transition is clear to continue) or "False" (user is returned to the transition screen or even the issue if there's no screen, without any changes being made).
With a "false" response, you add responses to the user by throwing InvalidInputException. If you want these to appear differently from the way Jira currently shows them, you'll need to amend the core code to provide alternate feedback.
Also, bear in mind the blunt nature of a validator. It's a yes/no response which allows or blocks the transition. You should NEVER change any data, inside Jira or in other systems in a validator, because you simply do not know if the transition is going to succeed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to give a message to user like that pop auimessage that when I create an issue.
I'm looking this:
https://developer.atlassian.com/display/JIRADEV/Creating+Workflow+Extensions#CreatingWorkflowExtensions-Part3.Createavalidator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just do something during the transition .It dosen't compact the result of the transition .
And then I need give a message to the user to show the result of this thing which is done during the transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A validator is the wrong place to "do something during a transition". Your original question was the right place - you do things in post-functions. Validators are for checking input.
As we've already told you though, if you want feedback from a post-function, you need to write it on to the issue so that it will be displayed on the view screen. If you want to change the way that works, you will need to start hacking the core of Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think we've answered that several times already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Some of the answers include the way to get close - write the information to the issue, then the user will see it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is not exactly what you are looking for but it will help you
https://developer.atlassian.com/display/JIRADEV/Displaying+Content+in+a+Dialog+in+JIRA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.