Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction of change order of backlog and sprints #105

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

augustocbx
Copy link

No description provided.

@@ -74,7 +74,7 @@ def available_custom_fields
receiver.send :include, InstanceMethods
receiver.class_eval {
validate :validate_sprint
scope :without_version, :where => {:fixed_version_id => nil}
scope :without_version, :conditions => {:fixed_version_id => nil}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the new Ruby 1.9 hash syntax.
Space inside { missing.
Space inside } missing.

@@ -51,7 +51,7 @@ def scrumbler_javascript_helper
}


javascript_tag "var Scrumbler = {}; Scrumbler.Translations = #{translations.to_json}; Scrumbler.root_url = '/'; Scrumbler.possible_points = #{ScrumblerIssueCustomField.points.possible_values.to_json};"
javascript_tag "var Scrumbler = {}; Scrumbler.Translations = #{translations.to_json}; Scrumbler.root_url = '../../'; Scrumbler.possible_points = #{ScrumblerIssueCustomField.points.possible_values.to_json};"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [210/80]

params[:issue] = HashWithIndifferentAccess.new({"custom_field_values" => {
ScrumblerIssueCustomField.priority.id.to_s => (priority).to_s
}
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing hash brace must be on the same line as the last hash element when opening brace is on the same line as the first hash element.

@issues = @issues.map do |issue|
params[:issue] = HashWithIndifferentAccess.new({"custom_field_values" => {
ScrumblerIssueCustomField.priority.id.to_s => (priority).to_s
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent the right brace the same as the first position after the preceding left parenthesis.

end
@issues = @issues.map do |issue|
params[:issue] = HashWithIndifferentAccess.new({"custom_field_values" => {
ScrumblerIssueCustomField.priority.id.to_s => (priority).to_s

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.
Don't use parentheses around a variable.

priority = @issues.first.get_prioroty
end
@issues = @issues.map do |issue|
params[:issue] = HashWithIndifferentAccess.new({"custom_field_values" => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space inside { missing.
Redundant curly braces around a hash parameter.

@@ -140,6 +140,21 @@ def move_issue_priority
@sprint = ScrumblerSprint.find(params[:sprint_id]) if params[:sprint_id]

@issues = @issue.fixed_version ? @sprint.issues : @project.issues.without_version
@issues = @issues.sort_by{ |i| i.get_prioroty}.reverse
if [email protected]?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Favor unless over if for negative conditions.

@@ -140,6 +140,21 @@ def move_issue_priority
@sprint = ScrumblerSprint.find(params[:sprint_id]) if params[:sprint_id]

@issues = @issue.fixed_version ? @sprint.issues : @project.issues.without_version
@issues = @issues.sort_by{ |i| i.get_prioroty}.reverse

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing to the left of {.
Pass &:get_prioroty as an argument to sort_by instead of a block.
Space missing inside }.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants