Beispiel #1
0
 public boolean setEffort(
     DefaultIssue issue, @Nullable Duration value, IssueChangeContext context) {
   Duration oldValue = issue.effort();
   if (!Objects.equals(value, oldValue)) {
     issue.setEffort(value != null ? value : null);
     issue.setFieldChange(
         context,
         TECHNICAL_DEBT,
         oldValue != null ? oldValue.toMinutes() : null,
         value != null ? value.toMinutes() : null);
     issue.setUpdateDate(context.date());
     issue.setChanged(true);
     return true;
   }
   return false;
 }
Beispiel #2
0
 public boolean setPastEffort(
     DefaultIssue issue, @Nullable Duration previousEffort, IssueChangeContext context) {
   Duration currentEffort = issue.effort();
   issue.setEffort(previousEffort);
   return setEffort(issue, currentEffort, context);
 }