Does anyone have examples to use script runner to automate/define a custom field within a workflow transition so that the executioner gets displayed on that custom field based from each workflow transition?
In a quick nutshell, we are defining our Change Control Process, so that TR/SR/MgrApprovers names get stamped/defined at these new custom fields and from what I was told from our vendors was to use Script Runner. Any thoughts would be greatly appreciated? Not sure if this is the right place to ask these questions, so here goes and/or if not, who do I contact?
In addition to the other mentioned options, the JIRA Workflow Toolbox plugin has workflow actions that can do this.
Wow~! ... thanks for your splendid feedback, this is great stuff! Never really used this portal as I've been pretty much just diving in and administrating JIRA by google and such. I'll come here more often
@Phill Fox [Adaptavist] I'll review your comment and try that out. For the rest, thank you and greatly appreciate it!
So Basically ... ;
The objective of the additional fields is to capture who and when the CCP (change control process) was reviewed and approved. The current workflow captures this only in the comment field and if the person didn't leave a comment, then there's no trace of who did what unless once looks at the history tab. To get this going for the team, I've made the comment field as required to get them by though upper management still wants a custom field in place to plugin, so when they pull their reports and such from a dashboard.. that info will be there.
Cheers,
Phet
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.
@Doug Swartz ; how would one go about getting this started? which post-function do we use basically? -thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your workflow on the appropriate transition, add a post function.
The simplest JIRA Workflow toolbox function to use is probably the "Copy a parsed text to a field".
In the parameters screen for the function:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow, looks like I have a few options to work with! Thanks, @Doug Swartz – cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html for how this would work in principle what you would need would be a line similar to
String currentUser = ((WorkflowContext) transientVars.get("context")).getCaller();
def userCf = customFieldManager.getCustomFieldObjectByName("<your user field>")
issue.setCustomFieldValue(userCf, currentUser)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do that with script runner but if you want an example on how to do that would you provide some more details, as I'm not really sure what exactly you want to see on the issue view screen ?
The user who executed the transition is stored in the issue history and you can view it without adding a custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If only a specific person (like assignee) can transition the issue, you can use JIRA Suite Utilities' Post Function (Copy Value From Other Field).
To do this;
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.