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

Auto create PBI is done #1

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

Auto create PBI is done #1

wants to merge 5 commits into from

Conversation

ravi-bhatt-btc
Copy link
Contributor

Changes made to creat PBI after Creating sprint.

@@ -59,6 +59,8 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id, "sprint_id"=> @sprint.id, "subject"=>"#{@sprint.name} pbi", "status_id"=> IssueStatus.find_by_name('In Progress').id , "priority_id"=> Enumeration.find_by_name('Normal').id, "assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date, "due_date"=>@sprint.sprint_end_date, "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"}, "description"=>""}}

Choose a reason for hiding this comment

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

Line is too long. Separate each key value pair in new line

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Remove trailing whitespace

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Space inside { missing.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Line is too long. [89/80]

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Calls 'customfield.find_by_name('story points')' 2 times (DuplicateMethodCall)

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Prefer to_s over string interpolation.

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Line is too long. [166/80]

"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",
"custom_field_values"=>{ "#{CustomField.find_by_name('Story Points').id}"=>"#{CustomField.find_by_name('Story Points').default_value}"},

Choose a reason for hiding this comment

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

Space inside } missing.

rescue Exception => @exception
logger.error("Exception: #{@exception.inspect}")
end
create_pbi_auto(params)

Choose a reason for hiding this comment

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

Use 2 (not 1) spaces for indentation.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

@@ -59,6 +59,19 @@ def create
raise 'Fail to update project with product backlog' unless @project.save!
end
flash[:notice] = l(:notice_successful_create)
pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",

Choose a reason for hiding this comment

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

Trailing whitespace detected.

pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,

Choose a reason for hiding this comment

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

Line is too long. [89/80]

pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,

Choose a reason for hiding this comment

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

Space found before comma.

pbi_params = {"issue"=>{"tracker_id"=> Tracker.find_by_name('Product Backlog').id,
"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,

Choose a reason for hiding this comment

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

Line is too long. [85/80]

"sprint_id"=> @sprint.id,
"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,

Choose a reason for hiding this comment

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

Line is too long. [93/80]

"subject"=>"#{@sprint.name} pbi",
"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,

Choose a reason for hiding this comment

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

Surrounding space missing for operator =>.

"status_id"=> IssueStatus.find_by_name('In Progress').id ,
"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,

Choose a reason for hiding this comment

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

Trailing whitespace detected.

"priority_id"=> Enumeration.find_by_name('Normal').id,
"assigned_to_id"=>"", "start_date"=>@sprint.sprint_start_date,
"due_date"=>@sprint.sprint_end_date,
"estimated_hours"=>"", "done_ratio"=>"0",

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

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.

3 participants