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.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JavaScript solutions have limited use, because they do not work, when the Issues are created on the server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Should this work any more? It does not seem to do in Jira 7.13.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.