mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed bugzilla time tracking
GitOrigin-RevId: 4ea7d8d0a8a1dd6c246837319f51063ff5aca40c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
88f279ae7f
commit
6ffb2dc80f
@@ -61,7 +61,7 @@ public abstract class TaskRepository {
|
||||
*/
|
||||
public static final int NATIVE_SEARCH = 0x0010;
|
||||
|
||||
public static final Pattern TIME_SPENT_PATTERN = Pattern.compile("([0-9]+)d ([0-9]+)h ([0-9]+)m");
|
||||
public static final Pattern TIME_SPENT_PATTERN = Pattern.compile("([0-9]+)h ([0-9]+)m");
|
||||
|
||||
/**
|
||||
* URL of the server to be used in requests. For more human-readable name of repository (e.g. some imaginary URL containing name of
|
||||
|
||||
@@ -30,12 +30,9 @@ public class BugzillaRepository extends BaseRepositoryImpl {
|
||||
|
||||
private static final Logger LOG = Logger.getInstance(BugzillaRepository.class);
|
||||
|
||||
// Copied from SendTimeTrackingInformationDialog
|
||||
private Version myVersion;
|
||||
|
||||
private boolean myAuthenticated;
|
||||
private String myAuthenticationToken;
|
||||
|
||||
private String myProductName = "";
|
||||
private String myComponentName = "";
|
||||
|
||||
@@ -245,14 +242,13 @@ public class BugzillaRepository extends BaseRepositoryImpl {
|
||||
task.getLastPost(), task.getTimeSpentFromLastPost(), timeSpent));
|
||||
Matcher matcher = TIME_SPENT_PATTERN.matcher(timeSpent);
|
||||
if (matcher.find()) {
|
||||
int days = Integer.valueOf(matcher.group(1));
|
||||
int hours = Integer.valueOf(matcher.group(2));
|
||||
int minutes = Integer.valueOf(matcher.group(3));
|
||||
int hours = Integer.valueOf(matcher.group(1));
|
||||
int minutes = Integer.valueOf(matcher.group(2));
|
||||
BugzillaXmlRpcRequest request = new BugzillaXmlRpcRequest("Bug.update")
|
||||
.requireAuthentication(true)
|
||||
.withParameter("ids", newVector(task.getId()))
|
||||
// the number of hours worked on the bug as double
|
||||
.withParameter("work_time", days * 24 + hours + minutes / 60.0);
|
||||
.withParameter("work_time", hours + minutes / 60.0);
|
||||
if (!StringUtil.isEmptyOrSpaces(comment)) {
|
||||
request.withParameter("comment", newHashTable("body", comment, "is_private", false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user