Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
229bf2d0
Commit
229bf2d0
authored
Sep 14, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 25521 - Keyword field in new bug entry. Patch by jeff.hedlund@matrixsi.com; r=gerv.
parent
2594a7d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
post_bug.cgi
post_bug.cgi
+28
-0
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+13
-0
No files found.
post_bug.cgi
View file @
229bf2d0
...
...
@@ -220,6 +220,27 @@ if (defined $::FORM{'cc'}) {
}
}
}
# Check for valid keywords and create list of keywords to be added to db
# (validity routine copied from process_bug.cgi)
my
@keywordlist
;
my
%
keywordseen
;
if
(
$::FORM
{
'keywords'
}
&&
UserInGroup
(
"editbugs"
))
{
foreach
my
$keyword
(
split
(
/[\s,]+/
,
$::FORM
{
'keywords'
}))
{
if
(
$keyword
eq
''
)
{
next
;
}
my
$i
=
GetKeywordIdFromName
(
$keyword
);
if
(
!
$i
)
{
$vars
->
{
'keyword'
}
=
$keyword
;
ThrowUserError
(
"unknown_keyword"
);
}
if
(
!
$keywordseen
{
$i
})
{
push
(
@keywordlist
,
$i
);
$keywordseen
{
$i
}
=
1
;
}
}
}
# Build up SQL string to add bug.
my
$sql
=
"INSERT INTO bugs "
.
...
...
@@ -281,6 +302,13 @@ foreach my $ccid (keys(%ccids)) {
SendSQL
(
"INSERT INTO cc (bug_id, who) VALUES ($id, $ccid)"
);
}
if
(
UserInGroup
(
"editbugs"
))
{
foreach
my
$keyword
(
@keywordlist
)
{
SendSQL
(
"INSERT INTO keywords (bug_id, keywordid)
VALUES ($id, $keyword)"
);
}
}
SendSQL
(
"UNLOCK TABLES"
)
if
Param
(
"shadowdb"
);
# Assemble the -force* strings so this counts as "Added to this capacity"
...
...
template/en/default/bug/create/create.html.tmpl
View file @
229bf2d0
...
...
@@ -177,6 +177,19 @@
<br>
</td>
</tr>
[% IF UserInGroup('editbugs') %]
<tr>
<td align="right" valign="top">
<strong>
<a href="describekeywords.cgi">Keywords</a>:
</strong>
</td>
<td colspan="3">
<input name="keywords" size="60" value=""> (optional)
</td>
</tr>
[% END %]
<tr>
<td></td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment