Promact/slack-erp-custom-integration-mvc

View on GitHub

Showing 321 of 517 total issues

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        private async Task UserProjectSetup()
        {
            UserLoginInfo info = new UserLoginInfo(_stringConstant.PromactStringName, _stringConstant.AccessTokenForTest);
            await _userManager.CreateAsync(user);
            await _userManager.AddLoginAsync(user.Id, info);
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 173..182
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 184..193
Slack.Automation/Promact.Core.Test/ScrumSetUpRepositoryTest.cs on lines 126..135

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 180.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        [HttpPost]
        [Route("leaverequest/leaveslashcommand")]
        public async Task<IHttpActionResult> SlackRequestAsync()
        {
            var request = HttpContext.Current.Request.Form;
Slack.Automation/Promact.Erp.Core/Controllers/LeaveRequestController.cs on lines 86..104

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 180.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        [HttpPost]
        [Route("leaverequest/leaveupdatebyslackbutton")]
        public async Task<IHttpActionResult> SlackButtonRequestAsync()
        {
            var request = HttpContext.Current.Request.Form;
Slack.Automation/Promact.Erp.Core/Controllers/LeaveRequestController.cs on lines 49..68

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 180.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        [Fact, Trait("Category", "Required")]
        public async Task QuestionAndAnswerFirstNotAnsweredAsync()
        {
            await mockAndUserCreateAsync();
            await _slackUserRepository.AddSlackUserAsync(slackUserDetails);
Severity: Major
Found in Slack.Automation/Promact.Core.Test/TaskMailRepositoryTest.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/TaskMailRepositoryTest.cs on lines 310..324

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 179.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        [Fact, Trait("Category", "Required")]
        public async Task QuestionAndAnswerForthNotAnsweredOrWrongAnswerAsync()
        {
            await mockAndUserCreateAsync();
            await _slackUserRepository.AddSlackUserAsync(slackUserDetails);
Severity: Major
Found in Slack.Automation/Promact.Core.Test/TaskMailRepositoryTest.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/TaskMailRepositoryTest.cs on lines 130..144

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 179.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it("check GroupName Already Exists", fakeAsync(() => {
        let fixture = TestBed.createComponent(GroupEditComponent);
        let groupEditComponent = fixture.componentInstance;
        groupEditComponent.checkGroupName(stringConstant.testGroupName);
        tick();
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 99..105
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 107..113
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 82..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 83.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it("check GroupName Already Not Exists", fakeAsync(() => {
        let fixture = TestBed.createComponent(GroupEditComponent);
        let groupEditComponent = fixture.componentInstance;
        groupEditComponent.checkGroupName(stringConstant.groupName);
        tick();
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 99..105
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 107..113
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 64..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 83.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it("check GroupName Already Not Exists", fakeAsync(() => {
        let fixture = TestBed.createComponent(GroupAddComponent);
        let groupAddComponent = fixture.componentInstance;
        groupAddComponent.checkGroupName(stringConstant.groupName);
        tick();
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 99..105
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 64..70
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 82..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 83.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it("check GroupName Already Exists", fakeAsync(() => {
        let fixture = TestBed.createComponent(GroupAddComponent);
        let groupAddComponent = fixture.componentInstance;
        groupAddComponent.checkGroupName(stringConstant.testGroupName);
        tick();
Slack.Automation/Promact.Erp.Web/app/Group/GroupAdd/groupAdd.component.spec.ts on lines 107..113
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 64..70
Slack.Automation/Promact.Erp.Web/app/Group/GroupEdit/groupEdit.component.spec.ts on lines 82..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 83.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        [Fact, Trait("Category", "Required")]
        public async Task LeaveApplyForSLWithBackDateAsync()
        {
            await AddUser();
            await AddThreeUserIncomingWebHookAsync();
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 913..925
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 930..942

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 169.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        [Fact, Trait("Category", "Required")]
        public async Task LeaveApplyForCLWithWrongDateFirstTestAsync()
        {
            await AddUser();
            await AddThreeUserIncomingWebHookAsync();
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 913..925
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 964..976

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 169.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        [Fact, Trait("Category", "Required")]
        public async Task LeaveApplyForCLWithBackDateAsync()
        {
            await AddThreeUserIncomingWebHookAsync();
            await AddUser();
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 930..942
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 964..976

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 169.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            if (datePipeMaxDate.transform(this.taskMail[0].MaxDate, this.stringConstant.dateDefaultFormat) === datePipeMaxDate.transform(this.taskMail[0].CreatedOn, this.stringConstant.dateDefaultFormat)) {
                this.isMaxDate = true;
            }
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 43..45
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 69..71
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 114..116
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 117..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            if (datePipeMinDate.transform(this.taskMail[0].MinDate, this.stringConstant.dateDefaultFormat) === datePipeMinDate.transform(this.taskMail[0].CreatedOn, this.stringConstant.dateDefaultFormat)) {
                this.isMinDate = true;
            }
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 43..45
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 90..92
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 114..116
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 117..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('Shows list of leave reports Details', () => {
        let fixture = TestBed.createComponent(LeaveReportDetailsComponent); //Create instance of component  
        let taskMailDetailsComponent = fixture.componentInstance;
        let result = taskMailDetailsComponent.ngOnInit();
        expect(taskMailDetailsComponent.leaveReportDetail.length).toBe(0);
Slack.Automation/Promact.Erp.Web/app/leaveReport/leaveReport-List/leaveReport-List.component.spec.ts on lines 43..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

                if (datePipeMinDate.transform(this.taskMail[0].MinDate, this.stringConstant.dateDefaultFormat) === datePipeMinDate.transform(this.taskMail[0].CreatedOn, this.stringConstant.dateDefaultFormat)) {
                    this.isMinDate = true;
                }
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 69..71
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 90..92
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 114..116
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 117..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            if (datePipe.transform(this.taskMail[0].MinDate, this.stringConstant.dateFormat) === datePipe.transform(this.taskMail[0].CreatedOn, this.stringConstant.dateFormat)) {
                this.isMinDate = true;
            }
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 43..45
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 69..71
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 90..92
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 114..116

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            if (datePipe.transform(this.taskMail[0].MaxDate, this.stringConstant.dateFormat) === datePipe.transform(this.taskMail[0].CreatedOn, this.stringConstant.dateFormat)) {
                this.isMaxDate = true;
            }
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 43..45
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 69..71
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 90..92
Slack.Automation/Promact.Erp.Web/app/taskmail/taskmail-details/taskmail-details.component.ts on lines 117..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('Shows list of leaveReports', () => {
        let fixture = TestBed.createComponent(LeaveReportListComponent); //Create instance of component  
        let leaveReportListComponent = fixture.componentInstance;
        let result = leaveReportListComponent.ngOnInit();
        expect(leaveReportListComponent.leaveReports.length).toBe(1);
Slack.Automation/Promact.Erp.Web/app/leaveReport/leaveReport-Details/leaveReport-Details.component.spec.ts on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    if (slackUser != null)
                    { 
                        _logger.Debug("GetAttachmentAndSendToTLAndManagementAsync Slack details of team leader : " + slackUser.Name);
                        var incomingWebHook = await _incomingWebHook.FirstOrDefaultAsync(x => x.UserId == user.SlackUserId);
                        //Creating an object of SlashIncomingWebhook as this format of value required while responsing to slack
Severity: Major
Found in Slack.Automation/Promact.Core.Repository/Client/Client.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Repository/Client/Client.cs on lines 136..144

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 159.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language