Summary field not required

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

This widget could not be displayed.

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.

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 :(
This widget could not be displayed.

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">
function addZero(num) {
return (num >= 0 && num < 10) ? "0" + num : num + "";
}

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

 

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 Community Champion Jul 25, 2018

Oh, and this part above was for something else entirely and doesn't need to be there ... accidentally left it in.

 

function addZero(num) {
return (num >= 0 && num < 10) ? "0" + num : num + "";
}
Davin Studer Community Champion Jul 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.

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 Community Champion Jul 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>
This widget could not be displayed.
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"
This widget could not be displayed.

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.

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

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.

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 yesterday 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...

81 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