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
77cb0150
Commit
77cb0150
authored
Mar 20, 2020
by
Давид Добряков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix time saving on bug creating
parent
be95dde1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
Bug.pm
Bugzilla/Bug.pm
+11
-0
timer.js
js/etersoft/timer.js
+4
-2
post_bug.cgi
post_bug.cgi
+2
-0
create.html.tmpl
template/ru/default/bug/create/create.html.tmpl
+1
-0
No files found.
Bugzilla/Bug.pm
View file @
77cb0150
...
@@ -733,6 +733,12 @@ sub create {
...
@@ -733,6 +733,12 @@ sub create {
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
};
my
$see_also
=
delete
$params
->
{
see_also
};
# fix work and productive time on bug creating
my
$work_time
=
delete
$params
->
{
work_time
};
my
$productive_time
=
delete
$params
->
{
productive_time
};
# 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.
...
@@ -823,6 +829,11 @@ sub create {
...
@@ -823,6 +829,11 @@ sub create {
# We now have a bug id so we can fill this out
# We now have a bug id so we can fill this out
$creation_comment
->
{
'bug_id'
}
=
$bug
->
id
;
$creation_comment
->
{
'bug_id'
}
=
$bug
->
id
;
# fix work and productive time writing on bug creating
$creation_comment
->
{
'work_time'
}
=
$work_time
;
$creation_comment
->
{
'productive_time'
}
=
$productive_time
;
# Insert the comment. We always insert a comment on bug creation,
# Insert the comment. We always insert a comment on bug creation,
# but sometimes it's blank.
# but sometimes it's blank.
Bugzilla::
Comment
->
insert_create_data
(
$creation_comment
);
Bugzilla::
Comment
->
insert_create_data
(
$creation_comment
);
...
...
js/etersoft/timer.js
View file @
77cb0150
...
@@ -13,7 +13,7 @@ var protocol = window.location.protocol;
...
@@ -13,7 +13,7 @@ var protocol = window.location.protocol;
var
changed_remain
=
0
;
var
changed_remain
=
0
;
//Создание баги
//Создание баги
var
etersoft_create
=
0
;
var
etersoft_create
=
window
.
location
.
href
.
search
(
'enter'
)
!==
-
1
?
1
:
0
;
// Объект таймера, создается при инициализации
// Объект таймера, создается при инициализации
// Подробнее про таймер см. timer_common.js
// Подробнее про таймер см. timer_common.js
...
@@ -151,6 +151,7 @@ Array.from(workTimeBtns).map(btn => {
...
@@ -151,6 +151,7 @@ Array.from(workTimeBtns).map(btn => {
// check comment before submit
// check comment before submit
let
comment
=
document
.
querySelector
(
"#comment"
).
value
;
let
comment
=
document
.
querySelector
(
"#comment"
).
value
;
if
(
comment
.
length
!==
0
)
{
if
(
comment
.
length
!==
0
)
{
if
(
comment
.
length
<
9
)
{
if
(
comment
.
length
<
9
)
{
alert
(
"Слишком короткий комментарий"
);
alert
(
"Слишком короткий комментарий"
);
...
@@ -165,7 +166,8 @@ Array.from(workTimeBtns).map(btn => {
...
@@ -165,7 +166,8 @@ Array.from(workTimeBtns).map(btn => {
alert
(
"Вы указали отработанное время более 8 часов. Нужно обязательно разбивать комментирование своей работы за день на отдельные части."
);
alert
(
"Вы указали отработанное время более 8 часов. Нужно обязательно разбивать комментирование своей работы за день на отдельные части."
);
}
}
else
{
else
{
mainCommitBtn
.
click
();
let
bugForm
=
etersoft_create
===
1
?
"#Create"
:
"#changeform"
;
document
.
querySelector
(
bugForm
).
submit
();
timer
.
clear
();
timer
.
clear
();
}
}
}
else
{
}
else
{
...
...
post_bug.cgi
View file @
77cb0150
...
@@ -109,6 +109,8 @@ push(
...
@@ -109,6 +109,8 @@ push(
see_also
see_also
estimated_time
estimated_time
deadline
deadline
work_time
productive_time
)
)
);
);
my
%
bug_params
;
my
%
bug_params
;
...
...
template/ru/default/bug/create/create.html.tmpl
View file @
77cb0150
...
@@ -368,6 +368,7 @@ TUI_hide_default('attachment_text_field');
...
@@ -368,6 +368,7 @@ TUI_hide_default('attachment_text_field');
<td colspan="2">
<td colspan="2">
<input name="estimated_time" size="6" maxlength="6" value="[% estimated_time FILTER html %]">
<input name="estimated_time" size="6" maxlength="6" value="[% estimated_time FILTER html %]">
<input name="work_time" id="work_time" value="0" hidden>
<input name="work_time" id="work_time" value="0" hidden>
<input name="productive_time" id="productive_time" value="0" hidden>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
...
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