estimancy/projestimate

View on GitHub

Showing 836 of 1,675 total issues

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

  def get_chart_data_effort_and_cost(pbs_project_element, module_project, estimation_value, view_widget)
    chart_data = []
    effort_breakdown_stacked_bar_dataset = {}

    return chart_data if (!module_project.pemodule.alias.eql?(Projestimate::Application::EFFORT_BREAKDOWN) || estimation_value.nil?)
Severity: Minor
Found in app/helpers/views_widgets_helper.rb - About 1 hr to fix

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

      def render_selected_wbs_activity_elements
        @project = Project.find(params[:project_id])
        authorize! :edit_project, @project
    
        @pe_wbs_project_activity = @project.pe_wbs_projects.activities_wbs.first
    Severity: Minor
    Found in app/controllers/projects_controller.rb - About 1 hr to fix

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

         plotTree: function(node, opt, animating) {
             var that = this, 
             viz = this.viz, 
             canvas = viz.canvas,
             config = this.config,
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                this.deleteEndpoint = function(object, doNotRepaintAfterwards) {
                    _currentInstance.doWhileSuspended(function() {
                        var endpoint = (typeof object == "string") ? endpointsByUUID[object] : object;            
                        if (endpoint) {                    
                            var uuid = endpoint.getUuid();
        Severity: Minor
        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                  function applyOptions() {
          
                      if (opts.showPaletteOnly) {
                          opts.showPalette = true;
                      }
          Severity: Minor
          Found in app/assets/javascripts/spectrum.js - About 1 hr to fix

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

                        placeAnchors = function(elementId, _anchorLists) {        
                            var cd = jsPlumbInstance.getCachedData(elementId), sS = cd.s, sO = cd.o,
                            placeSomeAnchors = function(desc, elementDimensions, elementPosition, unsortedConnections, isHorizontal, otherMultiplier, orientation) {
                                if (unsortedConnections.length > 0) {
                                    var sc = _sortHelper(unsortedConnections, edgeSortFunctions[desc]), // puts them in order based on the target element's pos on screen                
            Severity: Minor
            Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                  VmlEndpoint = window.VmlEndpoint = function(params) {
                      VmlComponent.apply(this, arguments);
                      var vml = null, self = this, opacityStrokeNode = null, opacityFillNode = null;
                      self.canvas = document.createElement("div");
                      self.canvas.style["position"] = "absolute";
              Severity: Minor
              Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                    fn.on_dragstart = function(e) {
                        e.preventDefault();
                
                        if (this.is_dragging) { return this; }
                
                
                Severity: Minor
                Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

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

                    , keydown: function (e) {
                        var $this
                          , $items
                          , $active
                          , $parent
                  Severity: Minor
                  Found in app/assets/javascripts/bootstrap.js - About 1 hr to fix

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

                        fn.draggable = function() {
                            var self = this;
                            var draggable_options = $.extend(true, {}, this.options.draggable, {
                                offset_left: this.options.widget_margins[0],
                                offset_top: this.options.widget_margins[1],
                    Severity: Minor
                    Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

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

                      function refresh_me(data){
                          var show_exclude = false;
                          //if($('input:checkbox').is(":checked")) {
                          if($('#show_excluded_elt:checkbox').is(":checked")) { show_exclude = true; }
                          else{ show_exclude = false; }
                      Severity: Minor
                      Found in app/assets/javascripts/projestimate_script.js - About 1 hr to fix

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

                          def create
                            @project = Project.find(params[:project_id])
                            authorize! :alter_project_pbs_products, @project
                        
                            @pbs_project_element = PbsProjectElement.new(params[:pbs_project_element])
                        Severity: Minor
                        Found in app/controllers/pbs_project_elements_controller.rb - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if(this.config.animate) {
                                this.compute('end');
                                this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode 
                                    && this.clickedNode.id || this.root));
                                this.fx.animate($.merge(this.config, {
                          Severity: Major
                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                                if ((wo.filter_$anyMatch && wo.filter_$anyMatch.length) || filters[c.columns]) {
                                                    data.anyMatchFlag = true;
                                                    data.anyMatchFilter = wo.filter_$anyMatch && ts.filter.getLatestSearch( wo.filter_$anyMatch ).val() || filters[c.columns] || '';
                                                    if (c.sortLocaleCompare) {
                                                        // replace accents
                            Severity: Major
                            Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                              Function computeSubtree has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                computeSubtree: function (root, x, y, width, height, initialDepth, maxDepth, posType) {
                              Severity: Major
                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                if ( ts.filter.regex.toTest.test(data.iFilter) ) {
                                                    var result, tmp,
                                                        table = c.table,
                                                        index = data.index,
                                                        parsed = data.parsed[index],
                                Severity: Major
                                Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                              if (!self.isFull() && !(idx == 0 && !self.isSource) && !(idx == 1 && !self.isTarget) && endpointEnabled) {
                                                                  var _doContinue = true;
                                  
                                                                  // the second check here is for the case that the user is dropping it back
                                                                  // where it came from.
                                  Severity: Major
                                  Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                                                } else if (/\s+(-|to)\s+/.test(val)){
                                                                                    s = val.split(/(?: - | to )/); // make sure the dash is for a range and not indicating a negative number
                                                                                    r1 = fmt(s[0].replace(wo.filter_regex.nondigit, ''), table);
                                                                                    r2 = fmt(s[1].replace(wo.filter_regex.nondigit, ''), table);
                                                                                    // parse filter value in case we're comparing numbers (dates)
                                    Severity: Major
                                    Found in app/assets/javascripts/pager.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                    if ((config.savePngFunction.split(' ')[1]=="left" && event.which==1) ||
                                                        (config.savePngFunction.split(' ')[1]=="middle" && event.which==2) ||
                                                        (config.savePngFunction.split(' ')[1]=="right" && event.which==3) ||
                                                        (typeof(config.savePngFunction.split(' ')[1])!="string")) saveCanvas(ctx,data,config,tpgraph); 
                                      Severity: Major
                                      Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                      if ((config.annotateFunction.split(' ')[1]=="left" && event.which==1) ||
                                                          (config.annotateFunction.split(' ')[1]=="middle" && event.which==2) ||
                                                          (config.annotateFunction.split(' ')[1]=="right" && event.which==3) ||
                                                          (typeof(config.annotateFunction.split(' ')[1])!="string")) doMouseMove(ctx, config, event) 
                                        Severity: Major
                                        Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language