kiwitcms/Kiwi

View on GitHub

Showing 264 of 409 total issues

Function filterTestExecutionsByProperty has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function filterTestExecutionsByProperty (runId, executions, filterBy, filterValue) {
    // no input => show all rows
    if (filterValue.trim().length === 0) {
        $('.test-execution-element').show()
        return
Severity: Minor
Found in tcms/testruns/static/testruns/js/get.js - About 1 hr to fix

    Function advancedSearchAndAddTestCases has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function advancedSearchAndAddTestCases (objId, rpcMethod, href, errorMessage) {
        window.addTestCases = function (testCaseIDs, sender) {
            let rpcErrors = 0
    
            // close the popup
    Severity: Minor
    Found in tcms/static/js/utils.js - About 1 hr to fix

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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_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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 90..92
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 60..62
      tcms/testplans/static/testplans/js/search.js on lines 64..66
      tcms/testruns/static/testruns/js/search.js on lines 70..72
      tcms/testruns/static/testruns/js/search.js on lines 74..76
      tcms/testruns/static/testruns/js/search.js on lines 78..80
      tcms/testruns/static/testruns/js/search.js on lines 82..84
      tcms/testruns/static/testruns/js/search.js on lines 86..88
      tcms/testruns/static/testruns/js/search.js on lines 94..96
      tcms/testruns/static/testruns/js/search.js on lines 98..100

      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 jsonRPC has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function jsonRPC (rpcMethod, rpcParams, callback, isSync) {
          // .filter() args are passed as dictionary but other args,
          // e.g. for .add_tag() are passed as a list of positional values
          if (!Array.isArray(rpcParams)) {
              rpcParams = [rpcParams]
      Severity: Minor
      Found in tcms/static/js/jsonrpc.js - About 1 hr to fix

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

              $('#btn-search-cases').click(function () {
                  return advancedSearchAndAddTestCases(
                      testPlanId, 'TestPlan.add_case', $(this).attr('href'),
                      $('#test_plan_pk').data('trans-error-adding-cases')
                  )
          Severity: Minor
          Found in tcms/testplans/static/testplans/js/get.js and 1 other location - About 55 mins to fix
          tcms/testruns/static/testruns/js/get.js on lines 178..183

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

          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

              $('#btn-search-cases').click(function () {
                  return advancedSearchAndAddTestCases(
                      testRunId, 'TestRun.add_case', $(this).attr('href'),
                      $('#test_run_pk').data('trans-error-adding-cases')
                  )
          Severity: Minor
          Found in tcms/testruns/static/testruns/js/get.js and 1 other location - About 55 mins to fix
          tcms/testplans/static/testplans/js/get.js on lines 62..67

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

          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

          @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 3 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/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

          @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 3 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/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="/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="/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

          Severity
          Category
          Status
          Source
          Language