Set issue summary in post-function on create

Hi all,

I've written a groovy script that populates the summary w/ a few custom fields on create. The script runs as a post-function before the issue is created, i.e.

  1. Script /home/jira/scripts/test.groovy will be run.
  2. Creates the issue originally.
  3. Re-index an issue to keep indexes in sync with the database.
  4. Fire aIssue Createdevent that can be processed by the listeners.

The script works but it won't let me create the issue without first entering something in the summary since it's a required field. Is there any way around this?

Thanks!

2 answers

1 accepted

This widget could not be displayed.

No. The summary is checked as being mandatory before your script gets a chance to execute.

The closest you can get is a javascript hack that dumps some default text into it so the user doesn't have to type a dummy value in.

Thanks. :) I thought so..

I tried the js hack but the problem with that is it overwrites the summary on edit. :/

This widget could not be displayed.

this may help:

<script type="text/javascript">
if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = "Some Information:\n";
}
</script>

Hi I'm goinf to try this but where would I past the javascript. thanks 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

85 views 1 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you