How to set default summary value before creation of issue (jira cloud)

Janco Hoekstra December 8, 2020

Sorry for us, but javascript in the field configuration is disabled in Jira Cloud.

What I want to do is get a default value in my summery field so on creation jira doesn't complain about the summary field has no value. 
In Jira Server this was possible by putting:

<script type="text/javascript">
if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = concat((document.getElementById("AB Nummer"))," ",(document.getElementById("Kunde"))) ;
}
</script>

in the Description of the summary field, but this doesn't work anymore in cloud.

So if anyone has a solution for this, I would be delighted.

2 answers

2 accepted

0 votes
Answer accepted
Paul Krueger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 8, 2020

See other resposne. This was in the wrong place and I can't find a way to delete a comment.

0 votes
Answer accepted
Paul Krueger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 8, 2020

It sounds like you want to populate the Summary field with the value of the AP Number field. I'd recommend using an automation rule for that. 

  • When: Issue created
  • If: matches (Summary is empty)
  • Then: Edit issue fields
  • Choose fields to set... Summary
    • From the drop-down, select Copy from issue
    • From the 3 dots, Copy from..., then select the Copy Summary from to select the appropriate field

You'll also need to make sure Summary isn't a required field when the issue is created. 

Janco Hoekstra December 8, 2020

Hello Paul, 

Thanks for your answer! 
I tried that but unfortunately there are 2 cons in that solution:

1 Setting a field value to more than one referenced field is impossible using Copy from
   Issue.
   I've tried doing it putting  %{summary} + " " + %{customfield_10039} via Set value but
   that doesn't seem to work (I'm still ongoing figuring it out)
2 Summary is a system field and you can't make it a non-required field, as far as I have
   found, or do you have a sugestion on how to do it?

Paul Krueger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 8, 2020

Ah, you may be right, perhaps Summary is always required. If you're just trying to append the value of your custom field I think you're on the right track but with incorrect syntax. 

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

{{issue.summary}} references the Summary field and {{issue.customfield_10039}} would reference your other value. 

You can use the "Log action" advanced action in Automation to log values such as "The summary is: {{issue.summary}}" or "{{issue.summary}} + {{issue.customfield_10039}}". Trigger the rule then take a look at the audit log to check if your syntax was correct. Once you've got it sorted out you can use that syntax to edit your Summary field and delete the Log action step.

Like Janco Hoekstra likes this
Janco Hoekstra December 8, 2020

Thanks Paul, this last hint about the syntax helped!
It now sets the desired value.

Remains that summary is always required problem. I think that it is as it is and they have to type something in the summery field...
The problem is that I want to give it a value before anything happens and that simply doesn't work in cloud..

do_mi_no October 12, 2021

Hello Janco,

I have the same problem in Jira Work Management Cloud.
Were you able to achieve your goal for the default summary value before creating your case?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events