You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi team
On JIRA service management portal, I have a two request types called "Feedback" and "New change"
On my Feedback form I have a issue picker field(Script runner field) called "Change ticket link" to select "New Change" issues,
When I select any issue in Issue picker field, If any linked issues already with selected New change request, those linked issues I need to set as "Change ticket link" description.
I have written this code on my behavior help me to complete this?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.properties.APKeys
import com.atlassian.jira.datetime.DateTimeFormatter
import com.atlassian.jira.issue.customfields.impl.DateTimeCFType
import com.atlassian.jira.issue.fields.CustomField
import com.onresolve.jira.groovy.user.FieldBehaviours
import org.apache.log4j.Logger
import org.apache.log4j.Level
import groovy.transform.BaseScript
import java.sql.Timestamp
import java.text.SimpleDateFormat
@BaseScript FieldBehaviours fieldBehaviours
// Set the log level
def log = Logger.getLogger(getClass())
log.setLevel(Level.DEBUG)
// The issue picker field name param and also the field this behaviour is connected to in the behaviour
final issuePickerFieldName = "Change ticket link"
def links = ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())
getFieldByName("TextField").setDescription("${links}")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community. Need more information from your scripted field setup. So when customer selects the issue from "Change ticket link", does the field provide the customer with a listing of issuekey? Secondly, how you setting up the links between your JSM issues with your other issues - Are they done by the customers?
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Infrastructure Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Joseph Chung Yin , Thanks for your reply,
I have project called ABC and having two issuetypes/request types called "Feedback" and "New change".
First customer created "New change" request (ABC-1) and it closed, next customer created feedback for new change and selected ABC-1 from "Change ticket link" (this script runner issue picket which is running through JQl "Project=ABC and issuetype = "New change" and the list of issue will show as "Issue key and Issue summary"), once feedback created(ABC-1) both issue ABC-1 and ABC-2 will link through automation.
My requirement here
when customer going to create another feedback against ABC-1, ex: when user trying to created another feedback and selected ABC-1 from "Change ticket link", the field should set helptext like " the selected issue having feedback already "ABC-2 - summary", so that customer know that "new change" already having feedback.
-Musku
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not aware of any solution where one can generate dynamic help-text on fields even using Script Runner at this time.
Sorry.
Best, Joseph
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.