-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core) Add update and delete comment Java/Rest APIs #4565
feat(core) Add update and delete comment Java/Rest APIs #4565
Conversation
processInstance DELETE /task/{taskId}/comment/{commentId} - deletes a comment of a given taskId and commentId DELETE /task/{taskId}/comment - deletes all comments of a given taskId PUT /task/comment - updates a comment DELETE /process-instance/{processInstanceId}/comment/{commentId} - deletes a comment of a given processInstanceId and commentId DELETE /process-instance/{processInstanceId}/comment. - deletes all comments of a given processInstanceId PUT /process-instance/comment - updates a comment related to: #2551 feat(engine-rest-core) Add update and delete Java/Rest APIs of task and processInstance feat(engine-rest-openapi) Add update and delete Java/Rest APIs of task and processInstance feat(engine) - add revision to comments - change authorization to task_assign from task_update - refactor code - add more java docs feat(engine) update task_assign authorization to task_work for delete/update comments Feedback Adjustments - fix verbiage in ftl files - add standalone tests for delete comment(s) by process instance id and task id - fix/rewrite sql statement - write additional process instance tests - few minor changes Fix engine-rest tests
0878e62
to
b07e214
Compare
To reviewer: |
@@ -187,6 +187,7 @@ create table ACT_HI_COMMENT ( | |||
FULL_MSG_ BLOB, | |||
TENANT_ID_ varchar(64), | |||
REMOVAL_TIME_ timestamp, | |||
REV_ integer not null default 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that we could not add REV_
without default value because it would be nullable and null by default, which is backward compatible. But nullable does not make sense for REV_
because we want all Comment
entities to have a revision index.
@yanavasileva, did I capture your intention correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several other REV_
columns in the same file are nullable, though, and don't have a default value.
❓ Why is this change necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharing discussed for transparency.
-- According to the confluence page the column either needs to be nullable or not null with a default value.
As we need to add default value either way, I decided to make the column not nullable.
-- do you know if we ever had this situation in the past?
-- Yes, 7.1 to 7.2 and there three queries there doing the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks great in general.
❓ I am not sure if I understood why the REV_
column needs to be non-nullable and have a default value. Several other REV_
columns in other tables are nullable. Details in this thread.
engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/put.ftl
Outdated
Show resolved
Hide resolved
...e-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/{commentId}/delete.ftl
Outdated
Show resolved
Hide resolved
I will ignore the small suggestions for now so I don't trigger the CI again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I am postponing the merge for now as I was not able to test the user operations yet. |
Co-authored-by: Miklas Boskamp <20189772+mboskamp@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
related to: #2551