kiwitcms/Kiwi

View on GitHub

Showing 104 of 405 total issues

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

    d3.select('.manual-bar')
        .attr('aria-valuenow', `${manualPercent}`)
        .attr('title', `${count.manual} Manual`)
        .style('width', `${manualPercent}%`)
Severity: Major
Found in tcms/telemetry/static/telemetry/js/testing/breakdown.js and 1 other location - About 1 hr to fix
tcms/telemetry/static/telemetry/js/testing/breakdown.js on lines 66..69

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 69.

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 (versionIds && versionIds.length) {
        if (!Array.isArray(versionIds)) {
            versionIds = [versionIds]
        }

Severity: Major
Found in tcms/static/js/utils.js and 1 other location - About 1 hr to fix
tcms/static/js/utils.js on lines 56..64

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 68.

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 (productIds && productIds.length) {
        if (!Array.isArray(productIds)) {
            productIds = [productIds]
        }

Severity: Major
Found in tcms/static/js/utils.js and 1 other location - About 1 hr to fix
tcms/static/js/utils.js on lines 100..108

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 68.

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 14 locations. Consider refactoring.
Open

            if ($('#id_after_planned_start').val()) {
                params.planned_start__gte = $('#id_after_planned_start').data('DateTimePicker').date().format('YYYY-MM-DD 00:00:00')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_after').val()) {
                params.created_at__gte = $('#id_after').data('DateTimePicker').date().format('YYYY-MM-DD 00:00:00')
            }
Severity: Major
Found in tcms/bugs/static/bugs/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_before_stop_date').val()) {
                params.stop_date__lte = $('#id_before_stop_date').data('DateTimePicker').date().format('YYYY-MM-DD 23:59:59')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_before_planned_stop').val()) {
                params.planned_stop__lte = $('#id_before_planned_stop').data('DateTimePicker').date().format('YYYY-MM-DD 23:59:59')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_before').val()) {
                params.created_at__lte = $('#id_before').data('DateTimePicker').date().format('YYYY-MM-DD 23:59:59')
            }
Severity: Major
Found in tcms/bugs/static/bugs/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_before_planned_start').val()) {
                params.planned_start__lte = $('#id_before_planned_start').data('DateTimePicker').date().format('YYYY-MM-DD 23:59:59')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_before_start_date').val()) {
                params.start_date__lte = $('#id_before_start_date').data('DateTimePicker').date().format('YYYY-MM-DD 23:59:59')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_after_planned_stop').val()) {
                params.planned_stop__gte = $('#id_after_planned_stop').data('DateTimePicker').date().format('YYYY-MM-DD 00:00:00')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_after_stop_date').val()) {
                params.stop_date__gte = $('#id_after_stop_date').data('DateTimePicker').date().format('YYYY-MM-DD 00:00:00')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 69..71
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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 14 locations. Consider refactoring.
Open

            if ($('#id_after_start_date').val()) {
                params.start_date__gte = $('#id_after_start_date').data('DateTimePicker').date().format('YYYY-MM-DD 00:00:00')
            }
Severity: Major
Found in tcms/testruns/static/testruns/js/search.js and 13 other locations - About 1 hr to fix
tcms/bugs/static/bugs/js/search.js on lines 43..45
tcms/bugs/static/bugs/js/search.js on lines 47..49
tcms/testcases/static/testcases/js/search.js on lines 76..78
tcms/testcases/static/testcases/js/search.js on lines 80..82
tcms/testplans/static/testplans/js/search.js on lines 61..63
tcms/testplans/static/testplans/js/search.js on lines 65..67
tcms/testruns/static/testruns/js/search.js on lines 73..75
tcms/testruns/static/testruns/js/search.js on lines 77..79
tcms/testruns/static/testruns/js/search.js on lines 81..83
tcms/testruns/static/testruns/js/search.js on lines 85..87
tcms/testruns/static/testruns/js/search.js on lines 89..91
tcms/testruns/static/testruns/js/search.js on lines 93..95
tcms/testruns/static/testruns/js/search.js on lines 97..99

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 56.

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

Function clone has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def clone(  # pylint: disable=too-many-arguments
Severity: Major
Found in tcms/testplans/models.py - About 1 hr to fix

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

    @permissions_required("testcases.delete_property")
    @rpc_method(name="TestCase.remove_property")
    def remove_property(query):
        """
        .. function:: TestCase.remove_property(query)
    Severity: Major
    Found in tcms/rpc/api/testcase.py and 4 other locations - About 55 mins to fix
    tcms/rpc/api/environment.py on lines 41..53
    tcms/rpc/api/testexecution.py on lines 274..286
    tcms/rpc/api/testexecution.py on lines 341..353
    tcms/bugs/api.py on lines 59..71

    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 37.

    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

    @permissions_required("testruns.delete_environmentproperty")
    @rpc_method(name="Environment.remove_property")
    def remove_property(query):
        """
        .. function:: Environment.remove_property(query)
    Severity: Major
    Found in tcms/rpc/api/environment.py and 4 other locations - About 55 mins to fix
    tcms/rpc/api/testcase.py on lines 576..588
    tcms/rpc/api/testexecution.py on lines 274..286
    tcms/rpc/api/testexecution.py on lines 341..353
    tcms/bugs/api.py on lines 59..71

    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 37.

    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

                {
                    data: null,
                    render: function (data, type, full, meta) {
                        return '<a href="/case/' + data.id + '/" target="_parent">' + escapeHTML(data.summary) + '</a>'
                    }
    Severity: Major
    Found in tcms/testcases/static/testcases/js/search.js and 3 other locations - About 50 mins to fix
    tcms/bugs/static/bugs/js/search.js on lines 67..72
    tcms/telemetry/static/telemetry/js/testing/execution-dashboard.js on lines 75..80
    tcms/testcases/static/testcases/js/get.js on lines 181..186

    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 52.

    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

                {
                    data: null,
                    render: function (data, type, full, meta) {
                        return '<a href="/bugs/' + data.pk + '/" target="_parent">' + escapeHTML(data.summary) + '</a>'
                    }
    Severity: Major
    Found in tcms/bugs/static/bugs/js/search.js and 3 other locations - About 50 mins to fix
    tcms/telemetry/static/telemetry/js/testing/execution-dashboard.js on lines 75..80
    tcms/testcases/static/testcases/js/get.js on lines 181..186
    tcms/testcases/static/testcases/js/search.js on lines 151..156

    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 52.

    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

                {
                    data: null,
                    render: function (data, type, full, meta) {
                        return '<a href="/plan/' + data.id + '/">' + escapeHTML(data.name) + '</a>'
                    }
    Severity: Major
    Found in tcms/testcases/static/testcases/js/get.js and 3 other locations - About 50 mins to fix
    tcms/bugs/static/bugs/js/search.js on lines 67..72
    tcms/telemetry/static/telemetry/js/testing/execution-dashboard.js on lines 75..80
    tcms/testcases/static/testcases/js/search.js on lines 151..156

    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 52.

    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

                {
                    data: null,
                    render: function (data, type, full, meta) {
                        return '<a href="/case/' + data.case + '/" >' + escapeHTML(data.case__summary) + '</a>'
                    }
    tcms/bugs/static/bugs/js/search.js on lines 67..72
    tcms/testcases/static/testcases/js/get.js on lines 181..186
    tcms/testcases/static/testcases/js/search.js on lines 151..156

    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 52.

    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