kiwitcms/Kiwi

View on GitHub

Showing 261 of 406 total issues

File get.js has 743 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { fetchBugDetails } from '../../../../static/js/bugs'
import { jsonRPC } from '../../../../static/js/jsonrpc'
import { propertiesCard } from '../../../../static/js/properties'
import { tagsCard } from '../../../../static/js/tags'
import {
Severity: Major
Found in tcms/testruns/static/testruns/js/get.js - About 1 day to fix

    File get.js has 520 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { jsonRPC } from '../../../../static/js/jsonrpc'
    import { tagsCard } from '../../../../static/js/tags'
    import {
    animate,
    advancedSearchAndAddTestCases,
    Severity: Major
    Found in tcms/testplans/static/testplans/js/get.js - About 1 day to fix

      File testcase.py has 482 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
       
      from datetime import timedelta
       
      from django.db.models.functions import Coalesce
      Severity: Minor
      Found in tcms/rpc/api/testcase.py - About 7 hrs to fix

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

        Severity: Major
        Found in tcms/testcases/migrations/0021_add_property_model.py and 1 other location - About 7 hrs to fix
        tcms/testruns/migrations/0016_testexecutionproperty.py on lines 0..34

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

        Severity: Major
        Found in tcms/testruns/migrations/0016_testexecutionproperty.py and 1 other location - About 7 hrs to fix
        tcms/testcases/migrations/0021_add_property_model.py on lines 0..34

        Function pageTestrunsGetReadyHandler has 162 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function pageTestrunsGetReadyHandler () {
        permissions.removeTag = $('#test_run_pk').data('perm-remove-tag') === 'True'
        permissions.addComment = $('#test_run_pk').data('perm-add-comment') === 'True'
        permissions.removeComment = $('#test_run_pk').data('perm-remove-comment') === 'True'
        permissions.viewHistoricalTestExecution = $('#test_run_pk').data('perm-view-historical-testexecution') === 'True'
        Severity: Major
        Found in tcms/testruns/static/testruns/js/get.js - About 6 hrs to fix

          Function toolbarEvents has 154 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function toolbarEvents (testPlanId, permissions) {
          $('.js-checkbox-toolbar').click(function (ev) {
          const isChecked = ev.target.checked
          const testCaseRows = $('.js-testcase-row').find('input')
           
           
          Severity: Major
          Found in tcms/testplans/static/testplans/js/get.js - About 6 hrs to fix

            Function pageTestcasesSearchReadyHandler has 145 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function pageTestcasesSearchReadyHandler () {
            initializeDateTimePicker('#id_before')
            initializeDateTimePicker('#id_after')
             
            const table = $('#resultsTable').DataTable({
            Severity: Major
            Found in tcms/testcases/static/testcases/js/search.js - About 5 hrs to fix

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

              $('#bulk-reviewer-button').click(function (ev) {
              $(this).parents('.dropdown').toggleClass('open')
              const selectedCases = getSelectedTestCases()
               
              if (!selectedCases.length) {
              Severity: Major
              Found in tcms/testplans/static/testplans/js/get.js and 1 other location - About 5 hrs to fix
              tcms/testplans/static/testplans/js/get.js on lines 545..564

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

              $('#default-tester-button').click(function (ev) {
              $(this).parents('.dropdown').toggleClass('open')
              const selectedCases = getSelectedTestCases()
               
              if (!selectedCases.length) {
              Severity: Major
              Found in tcms/testplans/static/testplans/js/get.js and 1 other location - About 5 hrs to fix
              tcms/testplans/static/testplans/js/get.js on lines 566..585

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

              Severity: Major
              Found in tcms/telemetry/urls.py and 1 other location - About 5 hrs to fix
              tcms/bugs/urls.py on lines 0..14

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

              @permissions_required("management.change_component")
              @rpc_method(name="Component.update")
              def update(component_id, values):
              """
              .. function:: RPC Component.update
              Severity: Major
              Found in tcms/rpc/api/component.py and 1 other location - About 5 hrs to fix
              tcms/rpc/api/build.py on lines 67..92

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

              @permissions_required("management.change_build")
              @rpc_method(name="Build.update")
              def update(build_id, values):
              """
              .. function:: RPC Build.update(build_id, values)
              Severity: Major
              Found in tcms/rpc/api/build.py and 1 other location - About 5 hrs to fix
              tcms/rpc/api/component.py on lines 84..108

              File utils.js has 378 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { jsonRPC } from './jsonrpc'
               
              /*
              Used to update a select when something else changes.
              */
              Severity: Minor
              Found in tcms/static/js/utils.js - About 5 hrs to fix

                Function pageTestrunsSearchReadyHandler has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                Open

                export function pageTestrunsSearchReadyHandler () {
                initializeDateTimePicker('#id_before_start_date')
                initializeDateTimePicker('#id_after_start_date')
                initializeDateTimePicker('#id_before_stop_date')
                initializeDateTimePicker('#id_after_stop_date')
                Severity: Minor
                Found in tcms/testruns/static/testruns/js/search.js - About 4 hrs to fix

                Function pageTestplansSearchReadyHandler has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function pageTestplansSearchReadyHandler () {
                initializeDateTimePicker('#id_before')
                initializeDateTimePicker('#id_after')
                 
                const rowsNotShownMessage = $('#main-element').data('trans-some-rows-not-shown')
                Severity: Major
                Found in tcms/testplans/static/testplans/js/search.js - About 4 hrs to fix

                  Function pageTestcasesGetReadyHandler has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function pageTestcasesGetReadyHandler () {
                  const caseId = $('#test_case_pk').data('pk')
                  const productId = $('#product_pk').data('pk')
                  const permRemoveTag = $('#test_case_pk').data('perm-remove-tag') === 'True'
                  const permRemoveComponent = $('#test_case_pk').data('perm-remove-component') === 'True'
                  Severity: Major
                  Found in tcms/testcases/static/testcases/js/get.js - About 4 hrs to fix

                    Function pageTestcasesSearchReadyHandler has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function pageTestcasesSearchReadyHandler () {
                    initializeDateTimePicker('#id_before')
                    initializeDateTimePicker('#id_after')
                     
                    const table = $('#resultsTable').DataTable({
                    Severity: Minor
                    Found in tcms/testcases/static/testcases/js/search.js - About 4 hrs to fix

                    Function pageTestrunsSearchReadyHandler has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function pageTestrunsSearchReadyHandler () {
                    initializeDateTimePicker('#id_before_start_date')
                    initializeDateTimePicker('#id_after_start_date')
                    initializeDateTimePicker('#id_before_stop_date')
                    initializeDateTimePicker('#id_after_stop_date')
                    Severity: Major
                    Found in tcms/testruns/static/testruns/js/search.js - About 4 hrs to fix

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

                      $('.js-toolbar-status').click(function (ev) {
                      $(this).parents('.dropdown').toggleClass('open')
                      const selectedCases = getSelectedTestCases()
                       
                      if (!selectedCases.length) {
                      Severity: Major
                      Found in tcms/testplans/static/testplans/js/get.js and 1 other location - About 4 hrs to fix
                      tcms/testplans/static/testplans/js/get.js on lines 516..529
                      Severity
                      Category
                      Status
                      Source
                      Language