zammad/zammad

View on GitHub

Showing 4,240 of 4,240 total issues

Method search_index_reload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def search_index_reload(silent: false, worker: 0)
      tolerance       = 10
      tolerance_count = 0
      query           = reorder(created_at: :desc)
      total           = query.count
Severity: Minor
Found in app/models/concerns/has_search_index_backend.rb - About 1 hr to fix

    Method assets has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def assets(data)
    
        app_model_chat_session = Chat::Session.to_app_model
    
        if !data[ app_model_chat_session ]
    Severity: Minor
    Found in app/models/chat/session/assets.rb - About 1 hr to fix

      Method custom_payload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def custom_payload
          {
            '@type':         'MessageCard',
            '@context':      'http://schema.org/extensions',
            themeColor:      '#{ticket.current_state_color}',
      Severity: Minor
      Found in app/models/webhook/pre_defined/microsoft_teams.rb - About 1 hr to fix

        Method last_contact_update_at has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def last_contact_update_at
        
            # if article in internal
            return false if internal
        
        
        Severity: Minor
        Found in app/models/ticket/article/has_ticket_contact_attributes_impact.rb - About 1 hr to fix

          Method list has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def self.list(data)
              linkobject = link_object_get(name: data[:link_object])
              return if !linkobject
          
              items = []
          Severity: Minor
          Found in app/models/link.rb - About 1 hr to fix

            Method _write_file has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def self._write_file(file, permission, data)
                location = "#{@@root}/#{file}"
            
                # rename existing file if not already the same file
                if File.exist?(location)
            Severity: Minor
            Found in app/models/package.rb - About 1 hr to fix

              Method with_permissions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def self.with_permissions(keys)
                  if keys.class != Array
                    keys = [keys]
                  end
                  permission_ids = []
              Severity: Minor
              Found in app/models/user.rb - About 1 hr to fix

                Method model_index_render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def model_index_render(object, params)
                    paginate_with(default: 500)
                
                    sql_helper = ::SqlHelper.new(object: object)
                    sort_by    = sql_helper.get_sort_by(params, 'id')
                Severity: Minor
                Found in app/controllers/application_controller/renders_models.rb - About 1 hr to fix

                  Method password_reset_verify has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def password_reset_verify
                      raise Exceptions::UnprocessableEntity, 'token param needed!' if params[:token].blank?
                  
                      # If no password is given, verify token only.
                      if params[:password].blank?
                  Severity: Minor
                  Found in app/controllers/users_controller.rb - About 1 hr to fix

                    Method search_generic has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def search_generic
                        # get params
                        query = params[:query]
                        if query.respond_to?(:permit!)
                          query = query.permit!.to_h
                    Severity: Minor
                    Found in app/controllers/search_controller.rb - About 1 hr to fix

                      Method index has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def index
                          system_online_service = Setting.get('system_online_service')
                      
                          assets = {}
                          external_credential_ids = []
                      Severity: Minor
                      Found in app/controllers/channels_microsoft365_controller.rb - About 1 hr to fix

                        Method index has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def index
                            system_online_service = Setting.get('system_online_service')
                        
                            assets = {}
                            external_credential_ids = []
                        Severity: Minor
                        Found in app/controllers/channels_google_controller.rb - About 1 hr to fix

                          Method sequence has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def self.sequence
                              [
                                'Import::Ldap::User::NormalizeEntry',
                                'Import::Ldap::User::RemoteId::FromEntry',
                                'Import::Ldap::User::RemoteId::Unhex',
                          Severity: Minor
                          Found in lib/sequencer/sequence/import/ldap/user.rb - About 1 hr to fix

                            Method initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def initialize(title:, header:, records:, locale:, timezone: nil)
                            
                                require 'write_xlsx' # Only load this gem when it is really used.
                            
                                @title           = title
                            Severity: Minor
                            Found in lib/excel_sheet.rb - About 1 hr to fix

                              Method all has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def self.all
                                  @all ||= begin
                                    all    = {}
                                    dir    = Rails.root.join('app/models').to_s
                                    tables = ActiveRecord::Base.connection.tables
                              Severity: Minor
                              Found in lib/models.rb - About 1 hr to fix

                                Method provider_inbound_mx has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def self.provider_inbound_mx(user, email, password, mx_domains)
                                    inbounds = []
                                    mx_domains.each do |domain|
                                      inbound = [
                                        {
                                Severity: Minor
                                Found in lib/email_helper.rb - About 1 hr to fix

                                  Method run has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def run
                                      return super if super
                                      return if !check_chat_exists
                                      return if blocked_ip?
                                      return if blocked_country?
                                  Severity: Minor
                                  Found in lib/sessions/event/chat_status_customer.rb - About 1 hr to fix

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

                                    export const useObjectAttributeLoadFormFields = (
                                      objectAttributeObjects: EnumObjectManagerObjects[],
                                    ) => {
                                      const objectAttributesByObject: Partial<
                                        Record<EnumObjectManagerObjects, ReturnType<typeof useObjectAttributes>>

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

                                        public fieldTypeAttributes() {
                                          const attributes: Partial<FormSchemaField> = {}
                                          const props: FormFieldAdditionalProps = {
                                            noOptionsLabelTranslation: !this.attributeConfig.translate,
                                            clearable: this.attributeConfig.nulloption || false,

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

                                        export const openOverlayContainer = async (
                                          type: OverlayContainerType,
                                          name: string,
                                          props: Record<string, unknown>,
                                        ) => {
                                        Severity: Minor
                                        Found in app/frontend/apps/desktop/composables/useOverlayContainer.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language