Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to use setError() to IssueType system field?

Hello ,

M using Scriptrunner Behaviors.

I tried adding a error msg using setError() function to issueType system field it is not working.

options i tried :

getFieldById("issuetype").setError("Error Msg")


import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE

getFieldById(ISSUE_TYPE).setError("Error Msg")


i trried getFieldChanged() also still no luck.

for the same readonly and required is working perfecly fine.


Please help

2 answers

@achal khawale Are you trying to set description for Issue Type field or when user select XXX issue type they get error message ?

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.*

def issuetype = getIssueContext().getIssueType().name

if (issuetype.contains("Bug")) {
.setDescription("<font size=\"2f\">This Issue type not in Use</font>")

else if (issuetype.contains("Android")) {
.setDescription("<font size=\"2f\"> Testing releated issues <font color=\"red\">Rush requests require Team Lead sign-off</font>")

setDescription works but no the error. i want to stop user from submitting the form

Hi @achal khawale if you want to stop creating issue under issue type then hide the issue type from the list or remove from issue type scheme.

I have tried:

getFieldById("issuetype").setError("Error Message.")
getFieldById(getFieldChanged()).setError("Error Message.")

They both work. It might be a bug, you might want to upgrade your ScriptRunner.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you