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
[ACA-3448] Candidate user is able to complete a task without a form attached before claiming it #5780
Conversation
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.
you need modify the documentation
} | ||
|
||
isProcessInitiator(): boolean { | ||
return this.currentLoggedUser && ( this.currentLoggedUser.id === +this.taskDetails.processInstanceStartUserId); |
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.
+this.taskDetails.processInstanceStartUserId is something wanted?
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.
yeah we need it, where UserRepresentation id is a number type and taskDetails.processInstanceStartUserId is string type.
Codecov Report
@@ Coverage Diff @@
## develop #5780 +/- ##
===========================================
+ Coverage 83.90% 85.70% +1.79%
===========================================
Files 955 99 -856
Lines 26995 3602 -23393
Branches 3765 481 -3284
===========================================
- Hits 22650 3087 -19563
+ Misses 3228 383 -2845
+ Partials 1117 132 -985 Continue to review full report at Codecov.
|
lib/process-services/src/lib/task-list/components/task-details.component.ts
Outdated
Show resolved
Hide resolved
lib/process-services/src/lib/task-list/components/task-details.component.ts
Outdated
Show resolved
Hide resolved
lib/process-services/src/lib/task-list/components/task-form/task-form.component.spec.ts
Outdated
Show resolved
Hide resolved
@@ -272,15 +274,26 @@ export class TaskFormComponent implements OnInit { | |||
} | |||
|
|||
isReadOnlyForm(): boolean { | |||
return this.internalReadOnlyForm || !(this.isAssignedToMe() || this.canInitiatorComplete()); | |||
let readOnlyForm: boolean; | |||
if (this.isCandidateMember()) { |
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 don't see any unit test related to this part. do we have it ?
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.
we have unit test for this case, here is the unit test https://github.com/Alfresco/alfresco-ng2-components/pull/5780/files#diff-33411bc1a3aec7d706037f6f3a5cec1fR166
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.
check comments
…ttached before claiming it
* Fixed comment
0462d26
to
ffcea23
Compare
lib/process-services/src/lib/task-list/models/task-action-failed.model.ts
Outdated
Show resolved
Hide resolved
@@ -161,6 +163,16 @@ describe('TaskFormComponent', () => { | |||
expect(errorSpy).toHaveBeenCalled(); | |||
}); | |||
|
|||
it('Should be able to disable complete button in case task shared with candidates and initiatorCanCompleteTask set to true', async () => { |
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.
Should be able to disable complete button
what does it mean?
Should be able to complete a candidate task if the user is the initiator?
Can we make sure we cover all the combinations?
Task with assignee started by the initiator (should be able to complete)
Task with assignee NOT started by the initiator (should NOT be able to complete)
Task with candidate users started by the initiator (should be able to claim and complete)
Task with candidate users NOT started by the initiator (should NOT be able to claim and complete)
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.
covered above scenarios please review thanks https://github.com/Alfresco/alfresco-ng2-components/pull/5780/files#diff-33411bc1a3aec7d706037f6f3a5cec1fR487
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
https://issues.alfresco.com/jira/browse/ACA-3448
What is the new behaviour?
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: