Hi all,
When an issue is created the Header from the issue show the name filled in the field summary right?
It will be possible change this header for this header show a custom field called Title instead Summary ?
Thanks in Advanced
BR
Fabio
Olá Fabio,
I have jscripted a short solution (tested with 4.4.5) based on JavaScript that could be placed in the announcement banner. The best place for such kind of scripts is a web resource plugin module which also let's you control that the resource is only included on the view issue page. Here goes the solution:
<script> (function($){ $(document).ready(function(){ // define the field that you want to show in header (instead of summary) // must be on screen else behaviour is as usual title_field = $("#customfield_10591-val") if (title_field) { title_val = title_field.text() if (title_val && title_val.length > 0) { // get summary field and save value in summary_val summary_field = $("#issue_header_summary a") summary_val = summary_field.text() // create the new summary element for for Details section newsummary = $("#issuedetails").children(":first").clone() newsummary_label = $("strong", newsummary) newsummary_label.text("Summary:") $("#type-val",newsummary).text(summary_val) // add the new summary element to details section (at the beginning) $("#issuedetails").prepend(newsummary) // change the header to value of custom field summary_field.text(title_val) } } }); })(AJS.$); </script>
In the line title_field = ... you have to replace the id by the id of your custom field. This solution falls back to the old behaviour if there is no such a field. Please note that it's important to add the Title field to the screen.
I hope it works well in your environment
Hi Dieter,
Thanks again for your help. I will test your solution in my environment test and let you informed.
Which file in JIra i should change to include a Custom field called "Classification" below from field "Prioridade" in the "Detalhes da Pendencia".
Can I do it in anouncement banner too ? Or there is other file that i can change ?
Thanks in Advance
BR
Fabio
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.
Hi Dieter,
Thanks for your help.
Actually i need from the field Summary and too of the custom field Title. But i would like that the custom field Title was showed in the Header from issue and the summary was showed in "Detalhes da Pendencia"for example.
By the way it will be possible add other custom field called Classification in "Detalhes da Pendencia" for example below from the field Priority ?
Thanks in Advanced
BR
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Olá de novo, if you need a copy of the summary in a custom field you could also achieve this by using a plugin, or a groovy postfunction
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.