YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerFormSubmitEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerFormSubmitEvent: function (form) {
            var thisInstance = this;
            var lockSave = true;
            if (app.getRecordId()) {
                form.on(Vtiger_Edit_Js.recordPreSave, function (e) {
Severity: Minor
Found in public_html/layouts/basic/modules/Calendar/resources/Edit.js - About 1 hr to fix

    Function showSidebarEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        showSidebarEvent(params) {
            const self = this,
                aDeferred = $.Deferred();
            const progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });
            if (typeof params == 'number') {

      Function registerUsersEvents has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              registerUsersEvents: function (modalContainer) {
                  modalContainer.find('.js-ic-canceled-btn').click(function (e) {
                      let btn = $(e.currentTarget);
                      let tr = btn.closest('tr');
                      let icon = tr.find('.js-change-icon');

        Function deleteRecord has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                deleteRecord: function (container) {
                    var thisInstance = this;
                    var recordId = container.find('#recordId').val();
                    app.showConfirmModal({
                        text: app.vtranslate('LBL_DELETE_CONFIRMATION'),
        Severity: Minor
        Found in public_html/layouts/basic/modules/Rss/resources/List.js - About 1 hr to fix

          Function setFieldOptions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  setFieldOptions: function (fieldName, options) {
                      const fieldElement = this.getForm().find(`[name="${fieldName}"]`),
                          fieldInfo = fieldElement.data('fieldinfo');
                      if (fieldElement.is('select') && fieldInfo) {
                          const val = fieldElement.val() ?? '',
          Severity: Minor
          Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

            Function loadConditions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    loadConditions: function (fieldSelect) {
                        var row = fieldSelect.closest('div.js-conditions-row');
                        var conditionSelectElement = row.find('select[name="comparator"]');
                        var conditionSelected = conditionSelectElement.val();
                        var fieldSelected = fieldSelect.find('option:selected');

              Function markNotifications has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  markNotifications: function (id) {
                      let aDeferred = $.Deferred();
                      let thisInstance = this;
                      let params = {
                          module: 'Notification',
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Vtiger.js - About 1 hr to fix

                Function registerStep1 has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        registerStep1() {
                            let chartType = $('select[name="chartType"]', this.container);
                            let moduleElement = $('select[name="module"]', this.container);
                            App.Fields.Picklist.showSelect2ElementView(moduleElement, {
                                placeholder: app.vtranslate('JS_SELECT_MODULE')

                  Function registerLastRelationsEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          registerLastRelationsEvent: function () {
                              let ids = [],
                                  listViewContentDiv = this.getListViewContentContainer(),
                                  isTimeLineActive = listViewContentDiv.find('.timeLineIconList').length;
                              listViewContentDiv.find('tr.listViewEntries').each(function () {
                  Severity: Minor
                  Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                    Function getDateInstance has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            getDateInstance: function (dateTime, dateFormat = CONFIG.dateFormat) {
                                let dateTimeComponents = dateTime.split(' '),
                                    dateComponent = dateTimeComponents[0],
                                    timeComponent = dateTimeComponents[1],
                                    seconds = '00',
                    Severity: Minor
                    Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                      Function readImageAsBase64 has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function readImageAsBase64() {
                              const aDeferred = jQuery.Deferred();
                              let fileI = self.getContentElement('tab-source', 'file'),
                                  n = null;
                              try {

                        Function showPopoverElementView has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            showPopoverElementView: function (selectElement = $('.js-popover-tooltip'), params = {}) {
                                let defaultParams = {
                                    trigger: 'manual',
                                    manualTriggerDelay: 500,
                                    placement: 'auto',
                        Severity: Minor
                        Found in public_html/layouts/resources/app.js - About 1 hr to fix

                          Method transformFieldTypeOfData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                              {
                                  $field = $table_name . ':' . $column_name;
                                  //Add the field details in this array if you want to change the advance filter field details
                          
                          
                          Severity: Minor
                          Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

                            Method create has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function create()
                                {
                                    $db = \App\Db::getInstance();
                                    $db->createCommand()->insert('vtiger_profile', [
                                        'profilename' => $this->name,
                            Severity: Minor
                            Found in vtlib/Vtiger/Profile.php - About 1 hr to fix

                              Method setNoRolePicklistValues has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function setNoRolePicklistValues($values)
                                  {
                                      $db = \App\Db::getInstance();
                                      $pickListNameIDs = ['recurring_frequency', 'payment_duration'];
                                      $picklistTable = 'vtiger_' . $this->name;
                              Severity: Minor
                              Found in vtlib/Vtiger/Field.php - About 1 hr to fix

                                Method testAddRole has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function testAddRole()
                                    {
                                        $recordModel = new \Settings_Roles_Record_Model();
                                        $parentRole = \Settings_Roles_Record_Model::getInstanceById('H2');
                                        $this->assertNotNull($parentRole);
                                Severity: Minor
                                Found in tests/Settings/Roles.php - About 1 hr to fix

                                  Method update has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function update($moduleInstance, $zipfile, $overwrite = true)
                                      {
                                          $module = $this->getModuleNameFromZip($zipfile);
                                          if (null !== $module) {
                                              $zip = \App\Zip::openFile($zipfile, ['checkFiles' => false]);
                                  Severity: Minor
                                  Found in vtlib/Vtiger/PackageUpdate.php - About 1 hr to fix

                                    Method testAddMultiImage has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function testAddMultiImage(): void
                                        {
                                            $recordModel = \Vtiger_Record_Model::getInstanceById(\Tests\Base\C_RecordActions::createProductRecord(false)->getId(), 'Products');
                                            $attach = [];
                                            foreach (self::$files as $i => $name) {
                                    Severity: Minor
                                    Found in tests/Base/Z_MultiImage.php - About 1 hr to fix

                                      Method vtwsSaveLeadRelations has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function vtwsSaveLeadRelations($leadId, $relatedId, $setype)
                                          {
                                              $db = \App\Db::getInstance();
                                              $dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
                                                  ->createCommand()->query();
                                      Severity: Minor
                                      Found in include/Webservices/Utils.php - About 1 hr to fix

                                        Method createUserPrivilegesFile has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function createUserPrivilegesFile($userId)
                                            {
                                                $file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges' . \DIRECTORY_SEPARATOR . "user_privileges_$userId.php";
                                                $user = [];
                                                $userInstance = \CRMEntity::getInstance('Users');
                                        Severity: Minor
                                        Found in app/PrivilegeFile.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language