diff --git a/module/task/js/create.js b/module/task/js/create.js index 10c979ad08..f5dc19c504 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -1,5 +1,40 @@ $(function() { + if(attribute == 'request' || attribute == 'review') + { + $('#story').closest('tr').hide(); + $("input[name='after'][value='toStoryList']").parent().hide(); + $("input[name='after'][value='continueAdding']").parent().hide(); + $("input[name='after'][value='toTaskList']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '0px'); + } + + execAttribute = attribute; + $('#execution').change(function() + { + link = createLink('execution', 'ajaxGetAttribute', "executionID=" + $('#execution').val()); + $.get(link, function(attribute) + { + execAttribute = attribute; + if(attribute == 'request' || attribute == 'review') + { + $('#story').closest('tr').hide(); + $("input[name='after'][value='toStoryList']").parent().hide(); + $("input[name='after'][value='continueAdding']").parent().hide(); + $("input[name='after'][value='toTaskList']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '0px'); + } + else + { + $('#story').closest('tr').show(); + $("input[name='after'][value='toStoryList']").parent().show(); + $("input[name='after'][value='continueAdding']").parent().show(); + $("input[name='after'][value='continueAdding']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '10px'); + } + }); + }) + $('#customField').click(function() { hiddenRequireFields(); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 3a132b9d2f..758b981809 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -110,7 +110,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) printExtendFields('', 'table', 'columns=3');?> - lifetime != 'ops') ? '' : 'hidden'?> + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))) ? '' : 'hidden'?> task->story;?> @@ -129,7 +129,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) - lifetime != 'ops'):?> + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?> task->selectTestStory;?>