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.
Hello,
We have a custom Issue Type called “Changes“ and it has a few custom fields. One of the custom field is “ Risk Assessment” and it a drop down with the options of “ Severe , high, major, minor and none”.
Is it possible to have a message /warning / pop up to tell the ticket owner when the “ risk assessment” is picked as Severe or Critical “ Assign this ticket to another Tech in your team“?
Is it doable? If it is, what would be the way to do it?
Thank you.
Elif
You put the script into the wrong place. You should add the field. There is the add field button in the bottom of the screen.
def RiskLevel = getFieldByName("Risk Levels")
if(RiskLevel.getValue()){
RiskLevel. setHelpText ("If Risk Level is High or Very High , assign this ticket to one of your team mates")
} else {
RiskLevel.clearError()
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try like this:
def RiskLevel = getFieldByName("Risk Levels")
if(RiskLevel.getValue() in ["High", "Very High"]){
RiskLevel.setHelpText ("If Risk Level is High or Very High , assign this ticket to one of your team mates")
} else {
RiskLevel.setHelpText ("")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev _cPrime_ , I am not getting any messages with this script you provided above. I tried all the screens, but nothing.
Any idea why?
Elif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev _cPrime_ , Custom field " Risk Levels" has set as select list multiple choice and it looks like below. If that helps?!
4- High (Change to critical system that will require downtime and is expected to impact service delivery. Reliable backups and back-off procedures in place.)
5- Very High (Change to critical systems that will require downtime and is expected to impact service delivery. Limited backups or back-off procedures.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try like this:
def RiskLevel = getFieldByName("Risk Levels")
if(RiskLevel.getValue().findAll{it.toString() in ["High", "Very High"]}){
RiskLevel.setHelpText ("If Risk Level is High or Very High , assign this ticket to one of your team mates")
} else {
RiskLevel.setHelpText ("")
}
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.
I figured out the issue. Thank you so much for your patience and help!
Elif
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.
Hello,
You can not do it out of the box. You need to use the Power Scripts add-on with the Live Fields feature or the ScriptRunner add-on with the behaviour feature.
https://confluence.cprime.io/display/JJUPIN/Live+Fields
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response. Do you have any sample scripts that I can use for https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html.
Elif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For example, like this:
def percent = getFieldByName("Percent") if(percent.getValue()){ percent.setError("This must be a number between 0-100") } else { percent.clearError() }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I apologize that I am not familiar with scripting. Here is what I did and nothing happens.
Should I add the value of the field Risk Levels ???? Any ideas?
if(RiskLevel.getValue(High, Very High)){
percent.setError("If Risk Level is High or very high , assign this ticket to one of your teammates")
} else {
percent.clearError()
}
Thank you so much for your understanding.
Elif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should add the RiskLevels field to the behaviour and add your script there. As a result you will see the error text under the field on the Create, Edit or Transaciton Screen. You will not see the message on the View Screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev _cPrime_ , Please see the screen shot below and based on what you said it should work, however I am not getting any message on any Screens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I managed to see the message below, but now I am not able to pick a value for Risk Levels. It seems like something is blocking user to pick a value. Risk Levels is a required field for a submit for approval transition. I changed it to not required , but getting experiencing the same issue. Any ideas?
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.
Kindly paste your final script here. There must be a couple of change made.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev _cPrime_ @Elif Alverson We have a similar situation where we want to display a message when a particular field is updated to a particular value. After following exactly the various suggestions made here, I still don't see the message.
Our Scenario : The custom field 'Client Status' has different values,but when the user updates it to 'Closed', we want to display a message reminding them to attach the approval form.
The script currently looks as given below but please let me know if any changes needed. I have also added the field 'Client Status' to the behavior (Add Field)
===========================
def ClientStatus = getFieldByName("Client Status")
if(ClientStatus.getValue() in ["Closed"]){
ClientStatus.setHelpText ("Please make sure to attach production approval when client status is closed")
} else {
ClientStatus.setHelpText ("")
}
=============================
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alexey Matveev _cPrime_ I'm trying to do something similar so that when someone uploads a file via a service desk request a message appears after the file has been uploaded. Can this be done?
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Elif Alverson - I am trying to accomplish the same thing, but I need a message displayed when issue type - feature is selected. Any suggestions would be great.
Behaviour - mapped to all projects, Issue Type feature
Fields - Issue Type
Script
def issueTypeSel= getFieldByName("Issue Type")
if(issueTypeSel.getValue().findAll{it.toString() in ["Feature"]}){
issueTypeSel.setHelpText ("Message")
} else {
issueTypeSel.setHelpText ("")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trying to do the same type of thing with a date picker field using ScriptRunner version 6.1.0 and JIRA Server 7.13.13 but I'm not seeing the help. I've also tried to set the error and description and nothing... Finally, I've added a log.info statement and I see that my code is being executed but I don't see anything on the screen. Any ideas? Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.