js: select client project on global new issue page (#63897)

This commit is contained in:
Frédéric Péters 2022-04-13 15:13:14 +02:00
parent 5cc3d04bc6
commit d6cf8cf73b
1 changed files with 4 additions and 1 deletions

View File

@ -79,7 +79,10 @@ function sort_table() {
function alter_new_issue_page() {
// on global new issue page select "client" project by default
$('#issue_project_id option:contains("Projets Client")').next().attr('selected', 'selected')
if ($('#issue_project_id option:contains("Interne")').length == 0) {
/* select last entry that is not a subproject */
$('#issue_project_id option:not(:contains("»"))').last().attr('selected', 'selected');
}
// limit exclamation marks
$('input#issue_subject').on('keypress', function(evt) {
/* initial code from