.prop("author", issue.authorLogin())
.prop("actionPlan", actionPlanKey)
.prop("actionPlanName", actionPlan != null ? actionPlan.name() : null)
- .prop("debt", debt != null ? durations.format(UserSession.get().locale(), debt, Durations.DurationFormat.SHORT) : null)
+ .prop("debt", debt != null ? durations.encode(debt) : null)
.prop("creationDate", DateUtils.formatDateTime(issue.creationDate()))
.prop("fCreationDate", formatDate(issue.creationDate()))
.prop("updateDate", updateDate != null ? DateUtils.formatDateTime(updateDate) : null)
"status": "OPEN",
"severity": "MAJOR",
"author": "Developer 1",
- "debt": "2 minutes",
+ "debt": "2min",
"creationDate": "2014-02-14T23:04:29+0100",
"fCreationDate": "Feb 14, 2014 11:04 PM",
"updateDate": "2014-03-04T23:03:44+0100",
Issue issue = createStandardIssue().setDebt(debt);
issues.add(issue);
- when(durations.format(any(Locale.class), eq(debt), eq(Durations.DurationFormat.SHORT))).thenReturn("2 hours 1 minutes");
+ when(durations.encode(debt)).thenReturn("2h1min");
MockUserSession.set();
WsTester.TestRequest request = tester.newGetRequest("api/issues", "show").setParam("key", issue.key());
"projectName": "SonarQube",
"rule": "squid:AvoidCycle",
"ruleName": "Avoid cycle",
- "debt": "2 hours 1 minutes",
+ "debt": "2h1min",
"creationDate": "2014-01-22T19:10:03+0100",
"fCreationDate": "Jan 22, 2014 10:03 AM",
"transitions": [],