Commit 351d7bdb authored by Javi Corvi's avatar Javi Corvi
Browse files

new version features

parent d1b00aa4
......@@ -79,6 +79,7 @@ public class DocumentAnnotations {
}
public Status getStatus() {
if(status==null)return Status.DRAFT;
return status;
}
......
......@@ -722,9 +722,11 @@ public class DocumentServiceImpl implements DocumentService {
@Override
public Status moveDocument(Long id, Status status) {
Document document = this.findByDocumentId(id);
DocumentAnnotations documentAnnotation = this.findDocumentAnnotationsByDocumentId(id);
document.setStatus(status);
documentAnnotation.setStatus(status);
documentRepository.save(document);
documentAnnotationsRepository.save(documentAnnotation);
createTracking(id, "admin", Action.MOVE, status.toString());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment