Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×We are using Jira Cloud with the most current version of Scriptrunner.
I am trying to add a component to a production support issue as a post function with scriptrunner on create. I have added the following script:
issueInput.fields.components += [[
name: "Support Issue"
]]
Im getting the following error:
2020-09-02 15:26:40.668 ERROR - No such property: issueInput for class: Script1 on line 1 2020-09-02 15:26:40.785 ERROR - Class: com.adaptavist.sr.cloud.workflow.RunScript, Config: [className:com.adaptavist.sr.cloud.workflow.RunScript, uuid:3b0cd080-f87b-4f3d-bdc6-682713f6bd31, description:Add Support Issue Component, enabled:true, condition:issueInput.fields.components += [[ name: "Support Issue" ]], executionUser:ADD_ON, accountId:5d28a2eb831d7b0bcfbe559a]
Any suggestions? I'm really new to Scriptrunner and having a hard time, so any help is very appreciated.
What is the outcome you're trying to achieve with the script?
Adding a component during creation might be possible to achieve without a script, using Automation. If you can provide the specific scenario, I'd be happy to try and find a solution :)
Ste
Hi Stephen,
I am trying to automatically add a component to a support issue when its created for tracking purposes.
We have a board that will track these issues with an expectation that they will be moved to other projects during their life cycle.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's possible to do with Automation if this helps?
For example, to add a project-level rule for this:
^ This should provide the desired outcome.
See more information about Automation for Jira on these pages.
-------------
You can also create this as a global (multi-project) rule if you prefer. You'll need to be a Jira Admin, then access Automation via Jira Settings > System > Automation Rules.
Just remember that global rules have an execution limit per month - whilst project executions are virtually unlimited.
For premium, the execution limit is 1000 executions per licensed premium user, per month, across your whole instance (eg. 200 users = 200K executions).
Ste
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.