opf/openproject

View on GitHub

Showing 635 of 1,693 total issues

Function getFormlyFieldConfig has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private getFormlyFieldConfig(fieldSchema:IOPFieldSchemaWithKey, formPayload:IOPFormModel):IOPFormlyFieldSettings|null {
    const {
      key, name: label, required, hasDefault, minLength, maxLength,
    } = fieldSchema;
    const fieldTypeConfigSearch = this.getFieldTypeConfig(fieldSchema);

    Function ngOnInit has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      ngOnInit():void {
        populateInputsFromDataset(this);
    
        this.updateAvailableOptions();
    
    

      Function constructor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        constructor(
          private componentFactoryResolver:ComponentFactoryResolver,
          readonly FocusHelper:FocusHelperService,
          private appRef:ApplicationRef,
          private $transitions:TransitionService,

        Function initializeDatepicker has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private initializeDatepicker(minimalDate?:Date|null) {
            this.datePickerInstance?.destroy();
            this.datePickerInstance = new DatePicker(
              this.injector,
              '#flatpickr-input',

          Function handleQueryLoadingError has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private handleQueryLoadingError(
              error:ErrorResource,
              queryProps:{ [key:string]:unknown },
              queryId?:string|null,
              projectIdentifier?:string|null,

            Function buildNotificationSetting has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function buildNotificationSetting(project:null|HalSourceLink, params:Partial<INotificationSetting>):INotificationSetting {
              return {
                _links: {
                  project: {
                    href: project ? project.href : null,

              Function update has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public update():void {
                  if (this.action.href === null) return;
              
                  const payload = {
                    lockVersion: this.workPackage.lockVersion,

                Function setupListener has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  setupListener() {
                    jQuery(document.body).on('mouseover', '.preview-trigger', (e) => {
                      e.preventDefault();
                      e.stopPropagation();
                      // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment

                  Function Sprint has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  RB.Sprint = (function ($) {
                    return RB.Object.create(RB.Model, RB.EditableInplace, {
                  
                      initialize: function (el) {
                        this.$ = $(el);
                  Severity: Minor
                  Found in frontend/src/stimulus/controllers/dynamic/backlogs/sprint.js - About 1 hr to fix

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

                      def initialize(name, url, options)
                        raise ArgumentError, "Invalid option :if for menu item '#{name}'" if options[:if] && !options[:if].respond_to?(:call)
                        raise ArgumentError, "Invalid option :html for menu item '#{name}'" if options[:html] && !options[:html].is_a?(Hash)
                        raise ArgumentError, "Cannot set the :parent to be the same as this item" if options[:parent] == name.to_sym
                    
                    
                    Severity: Minor
                    Found in lib/redmine/menu_manager/menu_item.rb - About 1 hr to fix

                      Function initializeChangeset has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        private initializeChangeset(value:GridWidgetResource) {
                          const schemaHref = 'customtext-schema';
                          const grid:GridResource = value.grid;
                          const resourceSource:HalSource = {
                            text: value.options.text,

                        Function populateInputsFromDataset has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function populateInputsFromDataset(instance:DatasetInputsDecorated):any {
                          // TypeScript won't allow us to do the necessary metaprogramming here since it does not
                          // know about these keys (probably because we should not touch them)
                          const cstr = instance.constructor as unknown as DatasetInputsComponent;
                        
                        
                        Severity: Minor
                        Found in frontend/src/app/shared/components/dataset-inputs.ts - About 1 hr to fix

                          Function createInitial has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            private createInitial():Observable<QueryResource> {
                              const projectIdentifier = this.state.params.projectPath as string;
                              const initializationProps = this.resource.options.queryProps as { [key:string]:unknown };
                              const queryProps = {
                                pageSize: 0,

                            Function loadingInterval has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  async () => {
                                    try {
                                      const response = await fetch(
                                        this.projectStorageOpenUrlValue,
                                        {

                              Function manageRow has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                manageRow(row:HTMLElement):void {
                                  const selectedField = this.getSelectedField(row);
                                  const selectedDirection = this.getSelectedDirection(row);
                              
                                  // we have deselected the field, so we need to unset the direction, remove the row and move it to the end of the list

                                Function onDaysMoved has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  public onDaysMoved(change:WorkPackageChangeset,
                                    dayUnderCursor:Moment,
                                    delta:number,
                                    direction:MouseDirection):CellDateMovement {
                                    const initialStartDate = change.pristineResource.startDate;

                                  Function ngOnInit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    ngOnInit():void {
                                      super.ngOnInit();
                                  
                                      this.showToolbarSaveButton = !!this.$state.params.query_props;
                                      this.setPartition(this.$state.current);

                                    Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      constructor(public readonly injector:Injector,
                                        public table:WorkPackageTable) {
                                        // Redraw table if the current row state changed
                                        this.querySpace
                                          .initialized

                                      Function getViewpoint$ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        public getViewpoint$():Observable<CreateBcfViewpointData> {
                                          if (!this.viewer) {
                                            return of();
                                          }
                                      
                                      

                                        Method create_cfs! has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def create_cfs!
                                              cfs = []
                                        
                                              # create some custom fields and add them to the project
                                              (all_cfs - %w(list multilist intrange)).each do |type|
                                        Severity: Minor
                                        Found in app/seeders/development_data/custom_fields_seeder.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language