-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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"=>""}} |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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}"}, |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 , |
There was a problem hiding this comment.
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 , |
There was a problem hiding this comment.
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 , |
There was a problem hiding this comment.
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 , |
There was a problem hiding this comment.
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 , |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
Changes made to creat PBI after Creating sprint.