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
526f3282
Commit
526f3282
authored
Jul 26, 2026
by
System Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[etersoft] Cherry-pick
103d7dc8
parent
af4d92df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
timer.js
js/etersoft/timer.js
+22
-0
No files found.
js/etersoft/timer.js
View file @
526f3282
...
@@ -328,6 +328,7 @@ window.addEventListener("load", function() {
...
@@ -328,6 +328,7 @@ window.addEventListener("load", function() {
// если время не задано, то пусть будет нулём
// если время не задано, то пусть будет нулём
workTime
=
workTime
||
0
;
workTime
=
workTime
||
0
;
<<<<<<<
HEAD
const
workTimeValue
=
calcTimeValue
(
workTime
);
const
workTimeValue
=
calcTimeValue
(
workTime
);
const
productiveTime
=
parseTimeInt
(
"#ProductTime"
)
||
workTime
;
const
productiveTime
=
parseTimeInt
(
"#ProductTime"
)
||
workTime
;
...
@@ -348,6 +349,27 @@ window.addEventListener("load", function() {
...
@@ -348,6 +349,27 @@ window.addEventListener("load", function() {
// check comment before submit
// check comment before submit
const
comment
=
document
.
querySelector
(
"#comment"
).
value
;
const
comment
=
document
.
querySelector
(
"#comment"
).
value
;
=======
// получаем estimatedTime
const
estimatedTimeElement
=
document
.
querySelector
(
'#estimated_time'
);
const
workedTimeElement
=
document
.
querySelector
(
'.bz_time_tracking_table > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(3)'
);
if
(
estimatedTimeElement
&&
workedTimeElement
)
{
const
estimatedTime
=
Number
(
estimatedTimeElement
.
value
);
// получаем отработанное время
const
workedTime
=
Number
(
workedTimeElement
.
innerText
);
// пересчитанное отработанное время
const
updatedWorkedTime
=
((
workedTime
*
100
)
+
(
workTimeValue
*
100
))
/
100
;
// считаем сколько осталось
const
remainingTimeValue
=
Math
.
ceil
(((
estimatedTime
*
100
)
-
(
updatedWorkedTime
*
100
)))
/
100
;
// обновляем оставшееся время
document
.
querySelector
(
"#remaining_time"
).
value
=
remainingTimeValue
>
0
?
remainingTimeValue
:
0
;
}
>>>>>>>
103
d7dc8c
([
fix
]
#
14867
:
fix
bug
creating
)
const
commentData
=
[
const
commentData
=
[
comment
,
comment
,
...
...
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