Summary field not required

GilK
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.
February 20, 2012

Hi,

Using JIRA, I want to log work for non-development tasks (vacation, sick leave, training, etc).

I've created a new project named Administation.

I've created a new issue type named Administration Issue.

I've created a new custom field (select list) named Administration Issue Type (vacation, sick leave, training, etc)

I want the user to fill two fields:

1. the administration issue type (vacation, sick leave, training, etc), using the select list

2. Log Work (to set number of days/hours)

However, JIRA requires the summary field as well...

I don't need the summary for the specific project->issue type.

How do I cancel the field from being required?

Thanks.

Janiv.

4 answers

1 accepted

8 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2012

Ah, sorry, I don't think Dieter is right here.

Unless it's changed in version 5, Summary is one of the tiny handful of absolutely mandatory fields. (The others as far as the user is concerned are project and type, and some others spring into being because of that - created and updated, the issue key and the status, for example). You can't make it optional without doing quite a lot of work in the core code of Jira to make it so.

I've cheated when I needed to automate it - wrote some simple javascript that generated a simple obvious value for it if the users left it blank (think it was reporter + current date), and put something on the screen to explain to the users what was going in there.

Dieter
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.
February 20, 2012
You are right Nic, i just assumed summary is handled like the other system fields description, due date, and so on ... And did not verify it :(
Daniel Brvnišťan November 18, 2020

For Server instances there is a workaround documented by Atlassian, which requires custom JS:
https://confluence.atlassian.com/jirakb/how-to-set-default-value-for-summary-field-in-jira-800692650.html 

It can then be changed various ways using scripts in workflow transitions, project automation, ScriptRunner Behaviours or manually by the team that processes the tickets etc.

I have made a feature request for the default value to be configurable in project settings, without having to code:
https://jira.atlassian.com/browse/JRACLOUD-75592

I would appreciate if you could vote for it if that would be a solution for you.

Thanks,
Daniel

Sascha Ziemann November 19, 2020

JavaScript solutions have limited use, because they do not work, when the Issues are created on the server.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2020

Correct, they're a fiddle, horrid to maintain and unreliable as they only "help" in a decreasing number of places, and I'm glad to say Atlassian are gradually getting rid of the ability to use them.

4 votes
Davin Studer
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 7, 2017

I've recently run into this myself. This is how I handled it.

I went to the field configuration for my project and then to the summary field. I clicked Edit. I then added the below code to the Description box. This will hide the summary row and then fill it with a value.

<script type="text/javascript">
if(AJS.$('#summary').length > 0) {
AJS.$('#summary').parent().addClass('hidden');
AJS.$('#summary').val('My value here');
}
</script>

 

Ruben May 16, 2018

Hello @Davin Studer

Just looking at your above solution and it's just what i need... However I want the summary to be filled by a custom field on the same screen.

My javascript skills are pretty poor... Its a custom field, are you able to help me at all?

Kind Regards,

Ruben

Davin Studer
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.
July 25, 2018

Do you happen to have ScriptRunner for Jira? It can be done with JavaScript as well, but if you happen to have ScriptRunner that would be a better place to do it.

Ruben July 26, 2018

Hello @Davin Studer ,

I managed to figure it out :-) 

Thank you for your help.

The only small problem i have now is if my Project and issue type hasn't been selected for the creation screen that doesn't have the summary field hidden, it will actually show.

My way around this issue is to change the project and issue type, and then refresh the page. However I do wonder if there is something that watches for an update so i won't need to advice people to do this.

Kind Regards,

Ruben

Davin Studer
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.
July 26, 2018

How about something like this?

<script type="text/javascript">
    function setSummary(value){
        AJS.$('#summary').val(value);
    }

    AJS.toInit(function(){
        setSummary('Stuff');
    });

    JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
        setSummary('Stuff');
    });
</script>
Sascha Ziemann February 26, 2020

Should this work any more? It does not seem to do in Jira 7.13.

0 votes
Javier March 16, 2012

Hi Dieter and Nic,

I have the same problem and I finally decided taking it out from Screen Schemes so undesired displaying is not a problem for me now.

Unfortunately, the need of a value for this field keeps on being a problem.

How and where can I set that javascript code to set a default value as "." in Summary field?

Although I have deployed JIRA in some customer, I have always tried to avoid using code so I am a newbie in this specific subject.

Thank you.

Javier.

Dieter
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.
March 16, 2012
hi Javier, in my respone https://answers.atlassian.com/questions/19123/how-to-create-simple-templates-for-iterative-jira-issues i have explained how to prefill the description fiel. Should work equally for summary if you replace descrption by summary
Javier March 16, 2012

Thank you, Dieter.

I have set some javascript in Summary field description but it did not work.

I was due to two main reasons:

- The field was not visible in the screens (thank you, Jobin, for your comments).

- The javascript code was set in the Default Field Configuration instead of being set in EACH Field Configuration that were involved in the issue.

Finally, everything went ok.

You can check it in: https://answers.atlassian.com/questions/42427/i-am-unable-to-set-summary-field-default-value

Thank you for your support.

Javier.

0 votes
Dieter
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.
February 20, 2012
You have to create a project specific field configuration scheme and a field configuration. in the field configuration make the field summary optional and the other two fields "administration issue type" and "log work" required. Map the issue type "administration issue" to the field configuration in the field configuration scheme. Then assign the field configuration scheme to project "administration"

Suggest an answer

Log in or Sign up to answer