TSK-1385: Custom1-4 of TaskHistoryEvents is not filled with the custom fields of the tasks anymore
This commit is contained in:
parent
220a64462f
commit
87de70f022
|
|
@ -4,7 +4,6 @@ import java.time.Instant;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import pro.taskana.common.api.exceptions.SystemException;
|
import pro.taskana.common.api.exceptions.SystemException;
|
||||||
import pro.taskana.task.api.TaskCustomField;
|
|
||||||
import pro.taskana.task.api.models.TaskSummary;
|
import pro.taskana.task.api.models.TaskSummary;
|
||||||
|
|
||||||
/** Super class for all task related events. */
|
/** Super class for all task related events. */
|
||||||
|
|
@ -61,10 +60,6 @@ public class TaskHistoryEvent {
|
||||||
porType = task.getPrimaryObjRef().getType();
|
porType = task.getPrimaryObjRef().getType();
|
||||||
porValue = task.getPrimaryObjRef().getValue();
|
porValue = task.getPrimaryObjRef().getValue();
|
||||||
}
|
}
|
||||||
custom1 = task.getCustomAttribute(TaskCustomField.CUSTOM_1);
|
|
||||||
custom2 = task.getCustomAttribute(TaskCustomField.CUSTOM_2);
|
|
||||||
custom3 = task.getCustomAttribute(TaskCustomField.CUSTOM_3);
|
|
||||||
custom4 = task.getCustomAttribute(TaskCustomField.CUSTOM_4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomAttribute(TaskHistoryCustomField customField, String value) {
|
public void setCustomAttribute(TaskHistoryCustomField customField, String value) {
|
||||||
|
|
@ -261,6 +256,35 @@ public class TaskHistoryEvent {
|
||||||
this.details = details;
|
this.details = details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(
|
||||||
|
getId(),
|
||||||
|
getBusinessProcessId(),
|
||||||
|
getParentBusinessProcessId(),
|
||||||
|
getTaskId(),
|
||||||
|
getEventType(),
|
||||||
|
getCreated(),
|
||||||
|
getUserId(),
|
||||||
|
getDomain(),
|
||||||
|
getWorkbasketKey(),
|
||||||
|
getPorCompany(),
|
||||||
|
getPorSystem(),
|
||||||
|
getPorInstance(),
|
||||||
|
getPorType(),
|
||||||
|
getPorValue(),
|
||||||
|
getTaskClassificationKey(),
|
||||||
|
getTaskClassificationCategory(),
|
||||||
|
getAttachmentClassificationKey(),
|
||||||
|
getOldValue(),
|
||||||
|
getNewValue(),
|
||||||
|
custom1,
|
||||||
|
custom2,
|
||||||
|
custom3,
|
||||||
|
custom4,
|
||||||
|
getDetails());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
|
|
@ -271,43 +295,29 @@ public class TaskHistoryEvent {
|
||||||
}
|
}
|
||||||
TaskHistoryEvent other = (TaskHistoryEvent) obj;
|
TaskHistoryEvent other = (TaskHistoryEvent) obj;
|
||||||
return Objects.equals(getId(), other.getId())
|
return Objects.equals(getId(), other.getId())
|
||||||
&& Objects.equals(getBusinessProcessId(), other.getBusinessProcessId())
|
&& Objects.equals(getBusinessProcessId(), other.getBusinessProcessId())
|
||||||
&& Objects
|
&& Objects.equals(getParentBusinessProcessId(), other.getParentBusinessProcessId())
|
||||||
.equals(getParentBusinessProcessId(), other.getParentBusinessProcessId())
|
&& Objects.equals(getTaskId(), other.getTaskId())
|
||||||
&& Objects.equals(getTaskId(), other.getTaskId())
|
&& Objects.equals(getEventType(), other.getEventType())
|
||||||
&& Objects.equals(getEventType(), other.getEventType())
|
&& Objects.equals(getCreated(), other.getCreated())
|
||||||
&& Objects.equals(getCreated(), other.getCreated())
|
&& Objects.equals(getUserId(), other.getUserId())
|
||||||
&& Objects.equals(getUserId(), other.getUserId())
|
&& Objects.equals(getDomain(), other.getDomain())
|
||||||
&& Objects.equals(getDomain(), other.getDomain())
|
&& Objects.equals(getWorkbasketKey(), other.getWorkbasketKey())
|
||||||
&& Objects.equals(getWorkbasketKey(), other.getWorkbasketKey())
|
&& Objects.equals(getPorCompany(), other.getPorCompany())
|
||||||
&& Objects.equals(getPorCompany(), other.getPorCompany())
|
&& Objects.equals(getPorSystem(), other.getPorSystem())
|
||||||
&& Objects.equals(getPorSystem(), other.getPorSystem())
|
&& Objects.equals(getPorInstance(), other.getPorInstance())
|
||||||
&& Objects.equals(getPorInstance(), other.getPorInstance())
|
&& Objects.equals(getPorType(), other.getPorType())
|
||||||
&& Objects.equals(getPorType(), other.getPorType())
|
&& Objects.equals(getPorValue(), other.getPorValue())
|
||||||
&& Objects.equals(getPorValue(), other.getPorValue())
|
&& Objects.equals(getTaskClassificationKey(), other.getTaskClassificationKey())
|
||||||
&& Objects
|
&& Objects.equals(getTaskClassificationCategory(), other.getTaskClassificationCategory())
|
||||||
.equals(getTaskClassificationKey(), other.getTaskClassificationKey())
|
&& Objects.equals(getAttachmentClassificationKey(), other.getAttachmentClassificationKey())
|
||||||
&& Objects
|
&& Objects.equals(getOldValue(), other.getOldValue())
|
||||||
.equals(getTaskClassificationCategory(),
|
&& Objects.equals(getNewValue(), other.getNewValue())
|
||||||
other.getTaskClassificationCategory())
|
&& Objects.equals(custom1, other.custom1)
|
||||||
&& Objects.equals(getAttachmentClassificationKey(),
|
&& Objects.equals(custom2, other.custom2)
|
||||||
other.getAttachmentClassificationKey())
|
&& Objects.equals(custom3, other.custom3)
|
||||||
&& Objects.equals(getOldValue(), other.getOldValue())
|
&& Objects.equals(custom4, other.custom4)
|
||||||
&& Objects.equals(getNewValue(), other.getNewValue())
|
&& Objects.equals(getDetails(), other.getDetails());
|
||||||
&& Objects.equals(custom1, other.custom1)
|
|
||||||
&& Objects.equals(custom2, other.custom2)
|
|
||||||
&& Objects.equals(custom3, other.custom3)
|
|
||||||
&& Objects.equals(custom4, other.custom4)
|
|
||||||
&& Objects.equals(getDetails(), other.getDetails());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(getId(), getBusinessProcessId(), getParentBusinessProcessId(), getTaskId(),
|
|
||||||
getEventType(), getCreated(), getUserId(), getDomain(), getWorkbasketKey(), getPorCompany(),
|
|
||||||
getPorSystem(), getPorInstance(), getPorType(), getPorValue(), getTaskClassificationKey(),
|
|
||||||
getTaskClassificationCategory(), getAttachmentClassificationKey(), getOldValue(),
|
|
||||||
getNewValue(), custom1, custom2, custom3, custom4, getDetails());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue