Skip to content
Permalink
Browse files

feature: refactoring of jira issue properties management on GUI and o…

…n XML configuration (triggered by #0008741: Not able to add Bug from Testlink to JIRA)
  • Loading branch information...
fmancardi committed Aug 15, 2019
1 parent 855bade commit f7101f935ae77158cbd48398dc8b4a436ec47802
@@ -1900,26 +1900,19 @@ function validateStepsReorder(cssClassName)
function toogleRequiredOnShowHide(oid,display_type)
{
var obj = document.getElementById(oid);
if (!obj)
{
if (!obj) {
return;
}

if(obj.style.display == 'none')
{
if(display_type != undefined)
{
if(obj.style.display == 'none') {
if(display_type != undefined) {
obj.style.display = display_type;
}
else
{
} else {
// SHOW, then field has to be Required
obj.style.display = '';
obj.setAttribute('required','required');
}
}
else
{
} else {
obj.style.display = 'none';
obj.removeAttribute('required');
}
@@ -1,9 +1,6 @@
{*
TestLink Open Source Project - http://testlink.sourceforge.net/
@filesource bugAdd.tpl
@internal revisions
@since 1.9.15
*}
{include file="inc_head.tpl"}

@@ -50,57 +47,13 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
size="{#BUGSUMMARY_SIZE#}" maxlength="{$gui->issueTrackerCfg->bugSummaryMaxLength}"
</p>

{if $gui->issueTrackerMetaData != ''}
<p>
{if $gui->issueTrackerMetaData.issueTypes != ''}
<label for="issueType">{$labels.issueType}</label>
{html_options name="issueType" options=$gui->issueTrackerMetaData.issueTypes.items
selected = $gui->issueType
}
{/if}

{if $gui->issueTrackerMetaData.priorities != ''}
<label for="issuePriority">{$labels.issuePriority}</label>
{html_options name="issuePriority" options=$gui->issueTrackerMetaData.priorities.items
selected = $gui->issuePriority
}
{/if}
</p>
{$itMetaData = $gui->issueTrackerMetaData}
{if '' != $itMetaData && null != $itMetaData}
{include file="./issueTrackerMetadata.inc.tpl"
useOnSteps=0
}
{/if} {* $itMetaData *}

<p>
{if $gui->issueTrackerMetaData.versions != '' &&
$gui->issueTrackerMetaData.versions.items != '' &&
is_array($gui->issueTrackerMetaData.versions.items)}
<label for="artifactVersion">{$labels.artifactVersion}</label>
<select class="chosen-select" data-placeholder=" " required
{if $gui->issueTrackerMetaData.versions.isMultiSelect}
name="artifactVersion[]" size="2" multiple
{else}
name="artifactVersion"
{/if}
>
{html_options options=$gui->issueTrackerMetaData.versions.items
selected = $gui->artifactVersion
}
</select>
{/if}

{if $gui->issueTrackerMetaData.components.items != ''}
<label for="artifactComponent">{$labels.artifactComponent}</label>
<select class="chosen-select" data-placeholder=" " required
{if $gui->issueTrackerMetaData.components.isMultiSelect}
name="artifactComponent[]" size="2" multiple
{else}
name="artifactComponent"
{/if}
>
{html_options options=$gui->issueTrackerMetaData.components.items
selected = $gui->artifactComponent
}
</select>
{/if}
</p>
{/if} {* $gui->issueTrackerMetaData *}
{/if}

{if $gui->issueTrackerCfg->tlCanAddIssueNote || $gui->user_action == 'create' || $gui->user_action == 'doCreate'}
@@ -3,9 +3,6 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
@filesource inc_exec_controls.tpl
Purpose: draw execution controls (input for notes and results)
Author : franciscom
@internal revisions
@since 1.9.15
*}
{$ResultsStatusCode=$tlCfg->results.status_code}
{if $args_save_type == 'bulk'}
@@ -162,70 +159,16 @@ Author : franciscom
</td>
</tr>

<tr>
<td colspan="2">
{if $gui->issueTrackerMetaData != ''}
<p>
{if $gui->issueTrackerMetaData.issueTypes != ''}
<label for="issueType">{$labels.issueType}</label>
{html_options name="issueType" options=$gui->issueTrackerMetaData.issueTypes.items
selected = $gui->issueType
}
{/if}

{if $gui->issueTrackerMetaData.priorities != ''}
<label for="issuePriority">{$labels.issuePriority}</label>
{html_options name="issuePriority" options=$gui->issueTrackerMetaData.priorities.items
selected = $gui->issuePriority
}
{/if}
</p>

<p>
{*
IMPORTANT:
Via Javascript the required attribute will be added when this input will be
done visible because user has clicked on 'Create Issue' checkbox
*}
{if $gui->issueTrackerMetaData.versions != '' &&
$gui->issueTrackerMetaData.versions.items != ''}
<label for="artifactVersion">{$labels.artifactVersion}</label>
<select class="chosen-select-artifact" data-placeholder=" " id="artifactVersion"
{if $gui->issueTrackerMetaData.versions.isMultiSelect}
name="artifactVersion[]" size="2" multiple
{else}
name="artifactVersion"
{/if}
>
{html_options options=$gui->issueTrackerMetaData.versions.items
selected = $gui->artifactVersion
}
</select>
{/if}

{*
IMPORTANT:
Via Javascript the required attribute will be added when this input will be
done visible because user has clicked on 'Create Issue' checkbox
*}
{if $gui->issueTrackerMetaData.components.items != ''}
<label for="artifactComponent">{$labels.artifactComponent}</label>
<select class="chosen-select-artifact" data-placeholder=" " id="artifactComponent"
{if $gui->issueTrackerMetaData.components.isMultiSelect}
name="artifactComponent[]" size="2" multiple
{else}
name="artifactComponent"
{/if}
>
{html_options options=$gui->issueTrackerMetaData.components.items
selected = $gui->artifactComponent
}
</select>
{$itMetaData = $gui->issueTrackerMetaData}
{if '' != $itMetaData && null != $itMetaData}
<tr>
<td colspan="2">
{include file="./issueTrackerMetadata.inc.tpl"
useOnSteps=0
}
</td>
</tr>
{/if}
</p>
{/if} {* $gui->issueTrackerMetaData *}
</td>
</tr>

<tr>
<td colspan="2">
@@ -197,13 +197,16 @@ Author : franciscom
</td>
</tr>

<tr>


<td colspan="2">
{include file="./issueTrackerMetadata.inc.tpl"}
</td>
</tr>
{$itMetaData = $gui->issueTrackerMetaData}
{if '' != $itMetaData && null != $itMetaData}
<tr>
<td colspan="2">
{include file="./issueTrackerMetadata.inc.tpl"
useOnSteps=0
}
</td>
</tr>
{/if}

<tr>
<td colspan="2">

0 comments on commit f7101f9

Please sign in to comment.
You can’t perform that action at this time.