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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e477b10a
Commit
e477b10a
authored
Mar 21, 2014
by
Gervase Markham
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.mozilla.org/bugzilla/bugzilla
parents
9cd13d0c
9f18c2a6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
19 deletions
+62
-19
Bug.pm
Bugzilla/Bug.pm
+20
-0
Bug.pm
Bugzilla/WebService/Bug.pm
+2
-1
enter_bug.cgi
enter_bug.cgi
+1
-0
post_bug.cgi
post_bug.cgi
+12
-1
global.css
skins/standard/global.css
+1
-1
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+9
-0
field.html.tmpl
template/en/default/bug/field.html.tmpl
+17
-16
No files found.
Bugzilla/Bug.pm
View file @
e477b10a
...
@@ -652,6 +652,7 @@ sub create {
...
@@ -652,6 +652,7 @@ sub create {
my
$blocked
=
delete
$params
->
{
blocked
};
my
$blocked
=
delete
$params
->
{
blocked
};
my
$keywords
=
delete
$params
->
{
keywords
};
my
$keywords
=
delete
$params
->
{
keywords
};
my
$creation_comment
=
delete
$params
->
{
comment
};
my
$creation_comment
=
delete
$params
->
{
comment
};
my
$see_also
=
delete
$params
->
{
see_also
};
# We don't want the bug to appear in the system until it's correctly
# We don't want the bug to appear in the system until it's correctly
# protected by groups.
# protected by groups.
...
@@ -715,6 +716,25 @@ sub create {
...
@@ -715,6 +716,25 @@ sub create {
}
}
}
}
# Insert any see_also values
if
(
$see_also
)
{
my
$see_also_array
=
$see_also
;
if
(
!
ref
$see_also_array
)
{
$see_also
=
trim
(
$see_also
);
$see_also_array
=
[
split
(
/[\s,]+/
,
$see_also
)
];
}
foreach
my
$value
(
@$see_also_array
)
{
$bug
->
add_see_also
(
$value
);
}
foreach
my
$see_also
(
@
{
$bug
->
see_also
})
{
$see_also
->
insert_create_data
(
$see_also
);
}
foreach
my
$ref_bug
(
@
{
$bug
->
{
_update_ref_bugs
}
||
[]
})
{
$ref_bug
->
update
();
}
delete
$bug
->
{
_update_ref_bugs
};
}
# Comment #0 handling...
# Comment #0 handling...
# We now have a bug id so we can fill this out
# We now have a bug id so we can fill this out
...
...
Bugzilla/WebService/Bug.pm
View file @
e477b10a
...
@@ -717,7 +717,8 @@ sub create {
...
@@ -717,7 +717,8 @@ sub create {
$dbh
->
bz_commit_transaction
();
$dbh
->
bz_commit_transaction
();
Bugzilla::BugMail::
Send
(
$bug
->
bug_id
,
{
changer
=>
$bug
->
reporter
});
$bug
->
send_changes
();
return
{
id
=>
$self
->
type
(
'int'
,
$bug
->
bug_id
)
};
return
{
id
=>
$self
->
type
(
'int'
,
$bug
->
bug_id
)
};
}
}
...
...
enter_bug.cgi
View file @
e477b10a
...
@@ -262,6 +262,7 @@ else {
...
@@ -262,6 +262,7 @@ else {
$vars
->
{
'blocked'
}
=
formvalue
(
'blocked'
);
$vars
->
{
'blocked'
}
=
formvalue
(
'blocked'
);
$vars
->
{
'deadline'
}
=
formvalue
(
'deadline'
);
$vars
->
{
'deadline'
}
=
formvalue
(
'deadline'
);
$vars
->
{
'estimated_time'
}
=
formvalue
(
'estimated_time'
);
$vars
->
{
'estimated_time'
}
=
formvalue
(
'estimated_time'
);
$vars
->
{
'see_also'
}
=
formvalue
(
'see_also'
);
$vars
->
{
'cc'
}
=
join
(
', '
,
$cgi
->
param
(
'cc'
));
$vars
->
{
'cc'
}
=
join
(
', '
,
$cgi
->
param
(
'cc'
));
...
...
post_bug.cgi
View file @
e477b10a
...
@@ -22,6 +22,8 @@ use Bugzilla::Hook;
...
@@ -22,6 +22,8 @@ use Bugzilla::Hook;
use
Bugzilla::
Token
;
use
Bugzilla::
Token
;
use
Bugzilla::
Flag
;
use
Bugzilla::
Flag
;
use
List::
MoreUtils
qw(uniq)
;
my
$user
=
Bugzilla
->
login
(
LOGIN_REQUIRED
);
my
$user
=
Bugzilla
->
login
(
LOGIN_REQUIRED
);
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
...
@@ -101,7 +103,7 @@ push(@bug_fields, qw(
...
@@ -101,7 +103,7 @@ push(@bug_fields, qw(
version
version
target_milestone
target_milestone
status_whiteboard
status_whiteboard
see_also
estimated_time
estimated_time
deadline
deadline
)
);
)
);
...
@@ -204,12 +206,21 @@ my $bug_sent = Bugzilla::BugMail::Send($id, $recipients);
...
@@ -204,12 +206,21 @@ my $bug_sent = Bugzilla::BugMail::Send($id, $recipients);
$bug_sent
->
{
type
}
=
'created'
;
$bug_sent
->
{
type
}
=
'created'
;
$bug_sent
->
{
id
}
=
$id
;
$bug_sent
->
{
id
}
=
$id
;
my
@all_mail_results
=
(
$bug_sent
);
my
@all_mail_results
=
(
$bug_sent
);
foreach
my
$dep
(
@
{
$bug
->
dependson
||
[]
},
@
{
$bug
->
blocked
||
[]
})
{
foreach
my
$dep
(
@
{
$bug
->
dependson
||
[]
},
@
{
$bug
->
blocked
||
[]
})
{
my
$dep_sent
=
Bugzilla::BugMail::
Send
(
$dep
,
$recipients
);
my
$dep_sent
=
Bugzilla::BugMail::
Send
(
$dep
,
$recipients
);
$dep_sent
->
{
type
}
=
'dep'
;
$dep_sent
->
{
type
}
=
'dep'
;
$dep_sent
->
{
id
}
=
$dep
;
$dep_sent
->
{
id
}
=
$dep
;
push
(
@all_mail_results
,
$dep_sent
);
push
(
@all_mail_results
,
$dep_sent
);
}
}
# Sending emails for any referenced bugs.
foreach
my
$ref_bug_id
(
uniq
@
{
$bug
->
{
see_also_changes
}
||
[]
})
{
my
$ref_sent
=
Bugzilla::BugMail::
Send
(
$ref_bug_id
,
$recipients
);
$ref_sent
->
{
id
}
=
$ref_bug_id
;
push
(
@all_mail_results
,
$ref_sent
);
}
$vars
->
{
sentmail
}
=
\
@all_mail_results
;
$vars
->
{
sentmail
}
=
\
@all_mail_results
;
$format
=
$template
->
get_format
(
"bug/create/created"
,
$format
=
$template
->
get_format
(
"bug/create/created"
,
...
...
skins/standard/global.css
View file @
e477b10a
...
@@ -638,7 +638,7 @@ input.required, select.required, span.required_explanation {
...
@@ -638,7 +638,7 @@ input.required, select.required, span.required_explanation {
}
}
.bug_urls
{
.bug_urls
{
margin
:
0
0
1em
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
list-style-type
:
none
;
list-style-type
:
none
;
}
}
...
...
template/en/default/bug/create/create.html.tmpl
View file @
e477b10a
...
@@ -625,6 +625,15 @@ TUI_hide_default('attachment_text_field');
...
@@ -625,6 +625,15 @@ TUI_hide_default('attachment_text_field');
</td>
</td>
</tr>
</tr>
[% END %]
[% END %]
<tr>
[% INCLUDE bug/field.html.tmpl
bug = default
field = bug_fields.see_also
editable = 1
value = see_also
%]
</tr>
</tbody>
</tbody>
<tbody class="expert_fields">
<tbody class="expert_fields">
...
...
template/en/default/bug/field.html.tmpl
View file @
e477b10a
...
@@ -167,32 +167,33 @@
...
@@ -167,32 +167,33 @@
true);
true);
</script>
</script>
[% CASE constants.FIELD_TYPE_BUG_URLS %]
[% CASE constants.FIELD_TYPE_BUG_URLS %]
[% '<ul class="bug_urls">' IF value.size %]
[% IF bug.id && value.size %]
[% FOREACH bug_url = value %]
<ul class="bug_urls">
<li>
[% FOREACH bug_url = value %]
[% PROCESS bug_url_link bug_url = bug_url %]
<li>
<label><input type="checkbox" value="[% bug_url.name FILTER html %]"
[% PROCESS bug_url_link bug_url = bug_url %]
name="remove_[% field.name FILTER html %]">
<label><input type="checkbox" value="[% bug_url.name FILTER html %]"
Remove</label>
name="remove_[% field.name FILTER html %]">
</li>
Remove</label>
</li>
[% END %]
</ul>
[% END %]
[% END %]
[% '</ul>' IF value.size %]
[% IF Param('use_see_also') %]
[% IF Param('use_see_also') %]
<span id="container_showhide_[% field.name FILTER html %]"
<span id="container_showhide_[% field.name FILTER html %]"
class="bz_default_hidden">
class="bz_default_hidden">
(<a href="#" id="showhide_[% field.name FILTER html %]">add</a>)
(<a href="#" id="showhide_[% field.name FILTER html %]">add</a>)
</span>
</span>
<div id="container_[% field.name FILTER html %]">
<div id="container_[% field.name FILTER html %]">
<label for="[% field.name FILTER html %]">
<strong>Add [% terms.Bug %] URLs:</strong>
</label><br>
<input type="text" id="[% field.name FILTER html %]" size="40"
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input" name="[% field.name FILTER html %]">
class="text_input" name="[% field.name FILTER html %]"
[% IF !bug.id %]value="[% value FILTER html %]"[% END %]>
</div>
</div>
<script type="text/javascript">
[% IF bug.id %]
<script type="text/javascript">
setupEditLink('[% field.name FILTER js %]');
setupEditLink('[% field.name FILTER js %]');
</script>
</script>
[% END %]
[% END %]
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<div id="[% field.name FILTER html %]_container">
<div id="[% field.name FILTER html %]_container">
...
...
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