You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I have worked out part of the issue. I can get the code to activate a shell script on the server side when an issue passes through a transition containing the scriptrunner post function. The code also send the reporter ID parameter to the shell script. However I can only get this to work when I manually enter the issue key. Can anyone assist with allowing the code to pull whatever issue key it is running on? Thank you!
Original code (manual key entry):
import com.atlassian.jira.component.ComponentAccessor
def issueId = "TES-123" // test parameter, change me later
def issueReporter = ComponentAccessor.getIssueManager().getIssueObject(issueId).reporter
def sout = new StringBuilder()
def serr = new StringBuilder()
def cmd = "/home/smithj/account.sh"
def proc = new ProcessBuilder(cmd, issueReporter.username).start()
proc.consumeProcessOutput(sout,serr)
proc.waitForOrKill(30000)
if(serr){
log.error "Error exeucting shell script with standard error output: \n $serr"
log.debug "Erroring shell script had standard output:\n $sout"
} else {
log.debug "Shell script executed succesfully with standard output:\n $sout"
}
If this is from a workflow post function then use issue.key to get the issue key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK Dollar မွ ႀကိဳဆိုပါတယ္။ သင့္ လွ်ိဳ႕၀ွက္နံပါတ္သည္ H4BF4JE3II2Fc6Hb8JJ1a ျဖစ္သည္။ သင္ယခု လွ်ိဳ႕၀ွက္နံပါတ္ကို အသံုးျပဳၿပီးပါက လံုၿခံဳေရး အရ ယခု စာတိုကို ဖ်က္ပါ။
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.