opf/openproject

View on GitHub

Showing 635 of 1,693 total issues

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

  private buildHierarchyIndicator(workPackage:WorkPackageResource, jRow:JQuery|null, level:number):HTMLElement {
    const hierarchyIndicator = document.createElement('span');
    const collapsed = this.wpTableHierarchies.collapsed(workPackage.id!);
    const indicatorWidth = `${hierarchyBaseIndentation + (hierarchyIndentation * level)}px`;
    hierarchyIndicator.classList.add(hierarchyCellClassName);

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

      private renderHierarchyState(state:WorkPackageViewHierarchies) {
        const rendered = this.querySpace.tableRendered.value!;
    
        // Show all hierarchies
        jQuery('[class^="__hierarchy-group-"]').removeClass((i:number, classNames:string):string => (classNames.match(/__collapsed-group-\d+/g) || []).join(' '));

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

      export function getTimeSlicesForHeader(vp:TimelineViewParameters,
        unit:moment.unitOfTime.DurationConstructor,
        startView:Moment,
        endView:Moment) {
        const inViewport:[Moment, Moment][] = [];

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

          public resendMail():void {
            const { resendLink } = this.eeTrialService.store.getValue();
        
            if (!resendLink) {
              return;

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

            private toApiPayload(payload:HalSource, schema:SchemaResource) {
              const links:string[] = [];
          
              Object.keys(schema.$source).forEach((attribute) => {
                if (!['Integer',

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

              addFileLinks(
                collectionKey:string,
                addFileLinksHref:string,
                storage:IHalResourceLink,
                filesToLink:IFileLinkOriginData[],
            Severity: Minor
            Found in frontend/src/app/core/state/file-links/file-links.service.ts - About 1 hr to fix

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

                private autocompleteWorkPackages():Observable<(WorkPackageResource|SearchOptionItem)[]> {
                  const query = this.searchTerm;
                  if (query === null || query.match(/^\s+$/)) {
                    return of([]);
                  }

                Method group_settings_tabs has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def group_settings_tabs(group)
                    [
                      {
                        name: "general",
                        partial: "groups/general",
                Severity: Minor
                Found in app/helpers/groups_helper.rb - About 1 hr to fix

                  Method makediff has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def makediff(a, b)
                      mvector = self.class.lcs(a, b)
                      ai = bi = 0
                      while ai < mvector.length
                        bline = mvector[ai]
                  Severity: Minor
                  Found in lib_static/redmine/diff/array_string_diff.rb - About 1 hr to fix

                    Method push has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def push(name, url, options = {})
                        options = options.dup
                    
                        if options[:parent]
                          subtree = find(options[:parent])
                    Severity: Minor
                    Found in lib/redmine/menu_manager/mapper.rb - About 1 hr to fix

                      Method check has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def check(pop_options = {}, options = {})
                              host = pop_options[:host] || "127.0.0.1"
                              port = pop_options[:port] || "110"
                              apop = (pop_options[:apop].to_s == "1")
                              delete_unprocessed = (pop_options[:delete_unprocessed].to_s == "1")
                      Severity: Minor
                      Found in lib/redmine/pop3.rb - About 1 hr to fix

                        Method render_help_and_support has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def render_help_and_support(result)
                            result << content_tag(:li, class: "op-menu--item") do
                              content_tag :span, I18n.t("top_menu.help_and_support"),
                                          class: "op-menu--headline",
                                          title: I18n.t("top_menu.help_and_support")
                        Severity: Minor
                        Found in lib/redmine/menu_manager/top_menu/help_menu.rb - About 1 hr to fix

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

                            def self.all
                              @all ||= super + Set[
                                CostQuery::Filter::ActivityId,
                                CostQuery::Filter::AssignedToId,
                                CostQuery::Filter::AuthorId,
                          Severity: Minor
                          Found in modules/reporting/app/models/cost_query/filter.rb - About 1 hr to fix

                            Method render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def render
                                write(content_tag(:div, class: "advanced-filters--filter-operator") do
                                  hide_select_box = filter_class.available_operators.count == 1 || filter_class.heavy?
                                  options = { class: "advanced-filters--select filters-select filter_operator",
                                              id: "operators[#{filter_class.underscore_name}]",
                            Severity: Minor
                            Found in modules/reporting/lib/widget/filters/operators.rb - About 1 hr to fix

                              Function toggleApplicationPasswordDisplay has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                toggleApplicationPasswordDisplay(automaticManagementEnabled:boolean):void {
                                  switch (this.providerTypeValue) {
                                    case 'Storages::NextcloudStorage':
                                      if (!this.hasApplicationPasswordInputTarget) {
                                        return;

                                Function triggerContextMenuAction has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  public triggerContextMenuAction(action:WorkPackageAction, key:string) {
                                    const { link } = action;
                                
                                    switch (key) {
                                      case 'copy_to_other_project':

                                  Function myPageForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    private myPageForm(path:string):Observable<GridResource> {
                                      const payload = {
                                        _links: {
                                          scope: {
                                            href: path,

                                    Function create has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      public create(container:HTMLElement,
                                        injector:Injector,
                                        form:EditForm,
                                        schema:IFieldSchema,
                                        fieldName:string,

                                      Function insertProjectWithAncestors has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const insertProjectWithAncestors = (
                                        tree:IProjectAutocompleteItemTree[],
                                        project:IProjectAutocompleteItem,
                                        ancestors:IHalResourceLink[],
                                      ):IProjectAutocompleteItemTree[] => {

                                        Function setupDragAndDrop has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          private setupDragAndDrop() {
                                            // Make custom fields draggable
                                            // eslint-disable-next-line no-undef
                                            const drake = dragula([this.dragContainerTarget], {
                                              isContainer: () => false,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language