Skip to content

Commit

Permalink
Add user lookup.
Browse files Browse the repository at this point in the history
Fixe multiple bugs.
  • Loading branch information
ghendricks%novell.com committed Mar 8, 2007
1 parent d4d8cbf commit 9ffc3fe
Show file tree
Hide file tree
Showing 21 changed files with 184 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,33 @@
<link href="testopia/css/default.css" rel="stylesheet" type="text/css" />
[% PROCESS global/header.html.tmpl %]

<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["adduser"]
};
</script>
<script src="testopia/dojo/dojo.js" type="text/javascript"></script>
<script type="text/javascript">
dojo.require("dojo.widget.Select");
</script>

<h1>Access Control for Plan [% plan.id FILTER none %] - [% plan.name FILTER html %]</h1>
<p>
This page allows plan managers to permit access to a test plan. By default, members of the
<b>Testers</b> group in Bugzilla will have read and write access. Beyond this, users login names
(email addresses) that match a given regular expression will be granted the level of permissions
specified. Lastly, individuals can be granted additional permissions by adding them
explicitly. In other words, you cannot remove permissions from a user explicitily that has those rights
by virtue of membership in the Testers group or that matches the regular expression, although you can add
additional rights.
This page allows plan managers to permit access to a test plan. By
default, members of the <b>Testers</b> group in Bugzilla have read
and write access. Beyond this, login names (email addresses) that
match a given regular expression are granted the level of permissions
specified. Lastly, individuals can be granted additional permissions
by adding them explicitly. (Note: you cannot remove permissions from a
user that has those rights by virtue of membership in the Testers group
or that matches the regular expression, although you can add additional
rights to that user.)
</p>
<p>
Delete and Admin rights are always handled by the access control list, unless the
<b>testopia-allow-group-member-deletes</b> parameter is set to <i>on</i>. Doing so will grant
delete rights to the <b>Testers</b> group.
Delete and Admin rights are always handled by the access control list,
unless the <b>testopia-allow-group-member-deletes</b> parameter is set to
<i>on</i>. Doing so will grant delete rights to the <b>Testers</b> group.
</p>

[% PROCESS testopia/messages.html.tmpl %]
Expand Down Expand Up @@ -78,7 +91,16 @@ delete rights to the <b>Testers</b> group.
</tr>
[% END %]
<tr style="background-color:#D8E5EE">
<td style="padding: 3px;"><input style="width:200px;" name="adduser"></td>
<td style="padding: 3px;">
<input dojoType="Select"
dataUrl="tr_quicksearch.cgi?action=getuser&search=%{searchString}"
mode="remote"
autoComplete="true"
id="adduser"
name="adduser"
maxListLength="10"
style="width:200px; height:15px">
</td>
<td align="center"><input type="checkbox" name="nr" value="1"></td>
<td align="center"><input type="checkbox" name="nw" value="1"></td>
<td align="center"><input type="checkbox" name="nd" value="1"></td>
Expand Down
12 changes: 10 additions & 2 deletions webtools/testopia/template/en/default/testopia/case/add.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["tcaction", "tceffect", "tcsetup", "tcbreakdown"]
searchIds: ["tester","tcaction", "tceffect", "tcsetup", "tcbreakdown"]
};
</script>
<script src="testopia/dojo/dojo.js" type="text/javascript"></script>
Expand Down Expand Up @@ -71,7 +71,15 @@

function chgTester(obj) {
[% IF Param("useqacontact") AND action == 'Add' %]
document.getElementById('tester').value = qaContacts[obj.selectedIndex];
try{
document.getElementById('tester').value = qaContacts[obj.selectedIndex];
}
catch(e){
dojo.widget.manager.getWidgetById('tester').setValue(qaContacts[obj.selectedIndex]);
dojo.widget.manager.getWidgetById('tester').setLabel(qaContacts[obj.selectedIndex]);
}


[% ELSE %]
return;
[% END %]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
[%# Page Header #%]
[%############################################################################%]

[% PROCESS global/header.html.tmpl
title = "Delete Test Case: $case.id - $case.summary"
%]
[% IF deleted %]
[% title = "Case Deleted" %]
[% ELSE %]
[% title = "Delete Test Case: $case.id - $case.summary" %]
[% END %]
[% PROCESS global/header.html.tmpl %]

[% IF NOT deleted %]
You are about to permanently delete this test case with all its history.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<script type="text/javascript">
dojo.require("dojo.widget.Editor2");
dojo.require("dojo.widget.Editor2Plugin.DialogCommands");
dojo.require("dojo.widget.ComboBox");
setupDM = new DocumentManager("tcsetup", "[% action FILTER html %]", ["tcsetupHeading"]);
breakdownDM = new DocumentManager("tcbreakdown", "[% action FILTER html %]", ["tcbreakdownHeading"]);
actionDM = new DocumentManager("tcaction", "[% action FILTER html %]", ["tcactionHeading"]);
Expand All @@ -42,6 +43,14 @@
document.getElementById('addruns').disabled = true;
}
}


dojo.addOnLoad(
function() {
dojo.widget.manager.getWidgetById('tester').setValue('[% case.default_tester.login FILTER none %]');
dojo.widget.manager.getWidgetById('tester').setLabel('[% case.default_tester.login FILTER none %]');
}
);
</script>
[% END %]
<a name="attributes"></a>
Expand All @@ -55,7 +64,17 @@
</tr>
<tr>
<th align="right">Default Tester</td>
<td><input name="tester" id="tester" size="30" value="[% case.default_tester.login FILTER html %]" /></td>
<td><input dojoType="Select"
dataUrl="tr_quicksearch.cgi?action=getuser&search=%{searchString}"
mode="remote"
autoComplete="true"
id="tester"
name="tester"
maxListLength="10"
style="width:200px; height:15px"
value="[% case.default_tester.login FILTER html %]" >

</td>
<th align="right">Add Tags</td>
<td><input name="addtags" size="30" /></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
djConfig = {
isDebug: true,
parseWidgets: false,
searchIds: ["tcaction", "tceffect", "tcsetup", "tcbreakdown", "newtag","tagTable"]
searchIds: ["tcaction", "tceffect", "tcsetup", "tcbreakdown", "newtag","tagTable","tester"]
};
</script>
<script src="testopia/dojo/dojo.js" type="text/javascript"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
[% PROCESS "testopia/search/report-matrix.html.tmpl"
obj = table.list.0
%]
This report does not include historical data. For a more comprehensive report on case-runs use the <a href="tr_query.cgi?report=1&current_tab=case_run">Generic Reports</a>
<p align="right">
<input type="button" value="Report" onclick="document.getElementById('filter_form').action='tr_caserun_reports.cgi';document.getElementById('filter_form').submit();">
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@
# ...
#%]

[% IF NOT dotweak %]
[% build_list = caserun.run.plan.product.builds(1) %]
[% default_build = caserun.build.name %]
<script type="text/javascript">
dojo.require("dojo.widget.Select");
dojo.addOnLoad(
function() {
dojo.widget.manager.getWidgetById('caserun_env').setValue('[% caserun.environment.id FILTER none %]');
dojo.widget.manager.getWidgetById('caserun_env').setLabel('[% caserun.environment.name FILTER none %]');
dojo.widget.manager.getWidgetById('caserun_env').setValue('[% dotweak ? '' : caserun.environment.id FILTER none %]');
dojo.widget.manager.getWidgetById('caserun_env').setLabel('[% dotweak ? '' : caserun.environment.name FILTER none %]');
dojo.widget.manager.getWidgetById('assignee').setValue('[% dotweak ? '' : caserun.assignee.login FILTER none %]');
dojo.widget.manager.getWidgetById('assignee').setLabel('[% dotweak ? '' : caserun.assignee.login FILTER none %]');
}
);
</script>
[% IF NOT run %]
[% build_list = caserun.run.plan.product.builds(1) %]
[% default_build = caserun.build.name %]
[% ELSE %]
[% default_build = "--Do Not Change--" %]
[% END %]
Expand Down Expand Up @@ -95,7 +98,7 @@
</td>
<th align="right">Environment</th>
<td><input dojoType="select"
dataUrl="tr_quicksearch.cgi?action=getenv&product_id=[% caserun.run.plan.product_id FILTER none %]&search=%{searchString}"
dataUrl="tr_quicksearch.cgi?action=getenv&run_id=[% caserun.run.id FILTER none %]&search=%{searchString}"
mode="remote"
autoComplete="false"
id="caserun_env"
Expand All @@ -115,7 +118,16 @@
[% END %]
<tr>
<th align="right">Assignee</th>
<td><input name="assignee" value="[% dotweak ? "--Do Not Change--" : caserun.assignee.login FILTER html %]"></td>
<td><input dojoType="Select"
dataUrl="tr_quicksearch.cgi?action=getuser&search=%{searchString}"
mode="remote"
autoComplete="true"
id="assignee"
name="assignee"
maxListLength="10"
style="width:200px; height:15px"
value="[% dotweak ? '' : caserun.assignee.login FILTER html %]" >
</td>
<th align="right">Attach [% terms.Bugs %]</th>
<td><input name="bugs">&nbsp;<a href="enter_bug.cgi?product=[% caserun.run.plan.product.name FILTER url_quote %]&caserun_id=[% caserun.id FILTER none %]" target="_blank"><img src="testopia/img/snew.gif" alt="Log a New Bug" title="Log a New Bug" style="vertical-align:text-bottom;" /></a>
<br><input type="checkbox" value="1" name="update_bug" id="update_bug">Update [% terms.bug %] status </td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["caserun_env"]
searchIds: ["assignee","caserun_env"]
};
</script>
<script src="testopia/js/util.js" type="text/javascript"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
[% caserun.environment.name FILTER html %]
[% IF caserun.canedit %]
<input dojoType="combobox"
dataUrl="tr_quicksearch.cgi?action=getenv&product_id=[% caserun.run.plan.product_id FILTER none %]&search=%{searchString}"
dataUrl="tr_quicksearch.cgi?action=getenv&run_id=[% caserun.run.id FILTER none %]&search=%{searchString}"
mode="remote"
autoComplete="false"
id="env_[% index %]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@
<div class="cc_i"><input type="button" value="Attach Bug" id="sk[% index %]" [% 'disabled="true"' UNLESS caserun.canedit %] onclick="attch([% index %], [% caserun.id FILTER none %], document.getElementById('mbg[% index %]').value);"/></div>
[%##### Assignee #####%]
<div class="cc_i"><input value="[% user.login FILTER html %]" id="assignee_[% index %]" /><input type="button" value="Assign" [% 'disabled="true"' UNLESS caserun.canedit %] onclick="chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value); chOwn([% index %], [% caserun.id FILTER none %], document.getElementById('assignee_[% index %]').value)">
<a href="javascript:userLookup('document.Create.assigned_to', document.Create.assigned_to.value);">
<img src="images/users.png" border="0" alt="Lookup User" title="Lookup User"></a>
</div>
<div style="float:right; margin-right:20px;">
<a href="tr_show_caserun.cgi?caserun_id=[% caserun.id FILTER none %]">Classic interface...</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["caserun_env"]
searchIds: ["caserun_env","assignee"]
};
</script>
<script src="testopia/dojo/dojo.js" type="text/javascript"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@
<td>[% plan.plan_type FILTER html %]</td>
</tr>
<tr class="bz_row_data">
<td colspan="3"><div align="right">
<td colspan="3">
<span style="float:left">
[% IF plan.canedit %]
<a href="#attributes">Edit Plan Attributes</a>
[% END %]
[% IF plan.canadmin %]
&nbsp;|&nbsp;<a href="tr_plan_access.cgi?plan_id=[% plan.id FILTER none %]">Edit Access Controls</a>
[% END %]

</span>
<div align="right">
<input type="hidden" name="plan_id" value="[% plan.id FILTER none %]">
[% IF plan.canedit %]
<input type="submit" name="action" value="Commit" style="visibility:hidden;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
# ...
#%]

[% title = "Bug Impact Report for Plan $plan.id - $plan.name" %]
[% PROCESS global/header.html.tmpl %]

<p>This report details the bugs detected in this test plan and the number of test cases that each bug is attached to.
Those bugs impacting the most test cases appear at the top.
Click the link under Test Cases to be taken to a list of those cases.
</p>
<table>
<tr>
<th>Test Cases</th>
<tr class="bz_row_header">
<th># of Test Cases</th>
<th>Bug</th>
</tr>
[% FOREACH row = bug_table %]
Expand All @@ -36,5 +41,7 @@
</tr>
[% END %]
</table>

<p>
<a href="tr_show_plan.cgi?plan_id=[% plan.id FILTER none %]">Back</a> to plan.
</p>
[% PROCESS global/footer.html.tmpl %]
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["tags","environment"]
searchIds: ["tags","environment","manager"]
};
</script>
<script src="testopia/js/util.js" type="text/javascript"></script>
Expand Down
15 changes: 13 additions & 2 deletions webtools/testopia/template/en/default/testopia/run/form.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
function() {
dojo.widget.manager.getWidgetById('environment').setValue('[% run.environment.id FILTER none %]');
dojo.widget.manager.getWidgetById('environment').setLabel('[% run.environment.name FILTER html %]');
dojo.widget.manager.getWidgetById('manager').setValue('[% run.manager.login ? run.manager.login : user.login FILTER html %]');
dojo.widget.manager.getWidgetById('manager').setLabel('[% run.manager.login ? run.manager.login : user.login FILTER html %]');
}
);
</script>
Expand Down Expand Up @@ -53,7 +55,16 @@

<tr>
<th align="right">Manager</th>
<td><input name="manager" value="[% run.manager.login ? run.manager.login : user.login FILTER html %]"></td>
<td><input dojoType="select"
dataUrl="tr_quicksearch.cgi?action=getuser&search=%{searchString}"
mode="remote"
autoComplete="false"
id="manager"
name="manager"
maxListLength="10"
style="width:200px; height:15px"
value="[% run.manager.login FILTER none %]" >
<input name="manager" value="[% run.manager.login ? run.manager.login : user.login FILTER html %]"></td>
<th align="right"><a href="tr_builds.cgi?product_id=[% run.plan.product_id FILTER none %]">Build</a></td>
<td>
[% PROCESS select sel = { name => "build",
Expand All @@ -80,7 +91,7 @@
<th align="right" valign="top"><a href="tr_list_environments.cgi?product_id=[% run.plan.product_id FILTER none %]">Environment</a></th>
<td valign="top">
<input dojoType="select"
dataUrl="tr_quicksearch.cgi?action=getenv&product_id=[% run.plan.product_id FILTER none %]&search=%{searchString}"
dataUrl="tr_quicksearch.cgi?action=getenv&run_id=[% run.id FILTER none %]&search=%{searchString}"
mode="remote"
autoComplete="false"
id="environment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["percent_bar","environment","tags","newtag","tagTable","tip_[% run.id FILTER none %]","caseruns_table",[% FOREACH cr = table.list %]"env_[% loop.count %]","head_caserun_[% loop.count %]"[%',' UNLESS loop.last %][% END %]]
searchIds: ["manager","percent_bar","environment","tags","newtag","tagTable","tip_[% run.id FILTER none %]","caseruns_table",[% FOREACH cr = table.list %]"env_[% loop.count %]","head_caserun_[% loop.count %]"[%',' UNLESS loop.last %][% END %]]
};
</script>
<script src="testopia/js/util.js" type="text/javascript"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,6 @@
<br/><br/>

</p>

<input name="isactive" type="hidden" value="1">
<input type="submit" value="Submit" id="search_submit">
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<tr>
<td valign="top">
[% FOREACH tag = item.tags %]

<a href="tr_tags.cgi?tag=[% tag.name FILTER none %]"><span class="tag">[% tag.name FILTER html %]</span></a>
[% IF item.canedit %]
<a onclick="removeTag([% tag.id FILTER none %],[% item.id FILTER none %],'[% type FILTER none %]')" style="decoration:none; cursor:pointer;">
Expand Down
2 changes: 1 addition & 1 deletion webtools/testopia/tr_list_caseruns.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if ($action eq 'Commit'){
$caserun = $caserun->switch($build,$env);

my $status = $cgi->param('status') == -1 ? $caserun->status_id : $cgi->param('status');
my $assignee = $cgi->param('assignee') eq '--Do Not Change--' ? $caserun->assignee->id : login_to_id(trim($cgi->param('assignee')));
my $assignee = $cgi->param('assignee') eq '' ? $caserun->assignee->id : login_to_id(trim($cgi->param('assignee')));
unless ($assignee){
print $cgi->multipart_end if $serverpush;
ThrowUserError("invalid_username", { name => $cgi->param('assignee') });
Expand Down
Loading

0 comments on commit 9ffc3fe

Please sign in to comment.