Skip to content
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

Merged
merged 8 commits into from Jun 22, 2020

Conversation

sivakumar414ram
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

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")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Copy link
Contributor

@eromano eromano left a 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);
Copy link
Contributor

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?

Copy link
Contributor Author

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-commenter
Copy link

codecov-commenter commented Jun 16, 2020

Codecov Report

Merging #5780 into develop will increase coverage by 1.79%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
...ss-services/src/lib/mock/task/task-details.mock.ts 100.00% <100.00%> (ø)
...k-list/components/task-form/task-form.component.ts 93.84% <100.00%> (+1.28%) ⬆️
lib/core/services/get-type.ts
lib/core/services/directionality-config-factory.ts
...d/src/lib/form/models/task-variable-cloud.model.ts
...s/icons/diagram-icon-box-publish-task.component.ts
...re/form/components/widgets/number/number.widget.ts
...ponents/add-permission/add-permission.component.ts
lib/core/mock/form/form.service.mock.ts
lib/core/pipes/multi-value.pipe.ts
... and 851 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01244b1...389964a. Read the comment docs.

@@ -272,15 +274,26 @@ export class TaskFormComponent implements OnInit {
}

isReadOnlyForm(): boolean {
return this.internalReadOnlyForm || !(this.isAssignedToMe() || this.canInitiatorComplete());
let readOnlyForm: boolean;
if (this.isCandidateMember()) {
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@mauriziovitale mauriziovitale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check comments

@@ -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 () => {
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mauriziovitale mauriziovitale merged commit 9a6fd01 into develop Jun 22, 2020
@mauriziovitale mauriziovitale deleted the dev-siva-ACA-3448 branch June 22, 2020 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants