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

feature-passo-historio #231

Open
wants to merge 68 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
803dcce
initial method to display please create a version for IE
halimali Oct 17, 2012
8b9a131
fix NG testcase create issue error with custom field.
halimali Oct 18, 2012
2b58e89
add the watchers controls/elements to the NG issue dialog
halimali Oct 18, 2012
09583ca
fix NG issue dialog, optional description is truncated
halimali Oct 18, 2012
16e3de1
flash error for test case not selected when press copy
halimali Oct 19, 2012
6a0a68f
Revert "initial method to display please create a version for IE"
halimali Oct 19, 2012
9c50c63
use params[:test_plan][:version_id] to check whether version already …
halimali Oct 19, 2012
f73b39b
Fix impasse_custom_fields_tabs bug
Oct 25, 2012
14f2f5d
Merge branch 'master' into develop
Oct 25, 2012
1eab65d
Merge branch 'fix_ie_no_version_2' into develop
Oct 25, 2012
e4ee1ca
Fix impasse_custom_fields_tabs nil
Oct 25, 2012
e5614ae
Fix impasse_custom_fields_tabs nil
Oct 25, 2012
298ed15
Made expected_results optional
cbeckr Dec 2, 2012
d7630c9
Merge branch 'master' into develop
cbeckr Dec 2, 2012
b9bd1b5
Added overview statistics
Dec 13, 2012
e9669c8
Added czech translation
Dec 14, 2012
2819491
Update app/views/impasse_executions/index.html.erb
wschramm Jan 29, 2013
575ef5d
Added untranslated Test Coverage
Feb 6, 2013
031af6b
Selected version in coverage is highlighted.
Feb 11, 2013
abaa0cf
#127 change labelled_tabular_form_for to labelled_form_for.
kawasima Oct 2, 2012
db70372
some labelled_tabular_form_for labels were unchanged and the plugin w…
mindo Apr 9, 2013
b131dfa
Create de.yml
cforce Apr 29, 2013
3c9486e
for some unknown reason commit dbca8424e2479b6c05eff74c12b1625d7e6a0e…
mindo May 9, 2013
e46ec4c
Merge branch 'develop' of https://github.com/gartz/redmine_impasse in…
cforce May 22, 2013
ade07fb
Merge branch 'develop' of https://github.com/mes/redmine_impasse into…
cforce May 22, 2013
23fbb30
Merge branch 'master' of https://github.com/tvrzna/redmine_impasse in…
cforce May 22, 2013
c6373ef
Merge branch 'patch-1' of https://github.com/cforce/redmine_impasse i…
cforce May 22, 2013
c21456a
Merge branch 'master' of https://github.com/thumbtack-technology/redm…
cforce May 22, 2013
c710c9d
Merge branch 'master' of https://github.com/mindo/redmine_impasse int…
cforce May 22, 2013
e27a232
Merge branch 'master' of https://github.com/wschramm/redmine_impasse …
cforce May 22, 2013
abf764d
Update init.rb
cforce May 22, 2013
b5c8ab3
Fixed database user, public user removed and fixed selectors that whe…
Jun 25, 2013
f0b10f4
Merge pull request #1 from gartz/develop
cforce Jun 25, 2013
b1ee1bc
add lables for coverage
Jul 14, 2013
664ce15
Merge pull request #2 from mkinski/develop
cforce Jul 15, 2013
2ee60a7
Merge branch 'develop' of https://github.com/cforce/redmine_impasse
cforce Jul 15, 2013
2b18301
reload paged conetn in ajax request in div - fix #178 fix #186
cforce Sep 6, 2013
0ec0912
fixes #178
cforce Sep 10, 2013
8cd14fa
fixes #178
cforce Sep 10, 2013
97c886c
Update impasse_test_case_controller.rb
cforce Oct 14, 2013
c207293
Update impasse_test_case_controller.rb
cforce Oct 14, 2013
d28340a
Merge pull request #5 from cforce/patch-3
cforce Oct 14, 2013
17112a9
Merge pull request #6 from cforce/patch-2
cforce Oct 14, 2013
dd8a49a
Create es.yml
cforce Oct 14, 2013
a74a2f2
Bug Fix:
guilhermenoronha Dec 18, 2013
25425fa
Merge pull request #2 from guilhermenoronha/develop
roquebrasilia Jan 22, 2014
0f22b9d
primeiro comite no desenv
Feb 5, 2014
5dc86ed
Merge remote-tracking branch 'origin/master' into develop
Feb 17, 2014
28338f9
Adicionando Branches de desenvolvimento para evoluir o plugin no bug …
roquebrasilia Feb 26, 2014
2ec46e1
[update]
roquebrasilia Feb 26, 2014
b21e06c
Com erro
roquebrasilia Feb 27, 2014
bc4d6e8
adicionado documento memores
roquebrasilia Feb 27, 2014
9637a01
Aicionado mer
roquebrasilia Feb 27, 2014
6f4a18a
adicionado modelo de step
roquebrasilia Feb 28, 2014
a302b5b
funcional a tela
roquebrasilia Feb 28, 2014
5f608a7
falta salvar no banco
roquebrasilia Feb 28, 2014
c6d1198
[]
roquebrasilia Mar 7, 2014
7e59e10
salvar estatudos do passo
roquebrasilia Mar 12, 2014
70a48d1
salvando parcialmente
roquebrasilia Mar 13, 2014
a0f12a6
falta fazer salvar o bug do step
roquebrasilia Mar 13, 2014
f11db97
funcional :=> proximo passo: listar o historico dos passos.
roquebrasilia Mar 14, 2014
2a48c86
o historico esta aparecendo em modal basta colocar no list
roquebrasilia Mar 17, 2014
09cc209
[primeiro ciclo de teste]
roquebrasilia Mar 18, 2014
0e5d720
faltou dois arquivo no ciclo de teste
roquebrasilia Mar 18, 2014
4247cc1
funcional 1
roquebrasilia Mar 18, 2014
3fc363f
remoção de lixo
roquebrasilia Mar 18, 2014
7065b1f
versao beta para homologação
roquebrasilia Mar 19, 2014
59c3d88
[adicionado versao 131-step]
roquebrasilia Mar 19, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>redmine_impasse3-desenv</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.ruby.core.rubynature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.runtime.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\n
Binary file not shown.
Binary file added 80-Ambiente-desenvolvimento-ruby.odt
Binary file not shown.
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
GEM
remote: http://rubygems.org/
specs:

PLATFORMS
ruby

DEPENDENCIES
axebomber
287 changes: 287 additions & 0 deletions app/controllers/impasse_exec_step_hists_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
class ImpasseExecStepHistsController < ImpasseAbstractController
unloadable

menu_item :impasse
before_filter :find_project_by_project_id, :only => [:new, :create,:execution_step,:create_step_bug]
#before_filter :find_project_by_project_id, :authorize
before_filter :check_for_default_issue_status, :only => [:new, :create, :create_step_bug]
before_filter :build_new_issue_from_params, :only => [:new, :create, :create_step_bug]

helper :journals
helper :projects
include ProjectsHelper
helper :custom_fields
include CustomFieldsHelper
helper :issue_relations
include IssueRelationsHelper
helper :watchers
include WatchersHelper
helper :attachments
include AttachmentsHelper
helper :queries
include QueriesHelper
helper :repositories
include RepositoriesHelper
helper :sort
include SortHelper
include IssuesHelper


include ActionView::Helpers::AssetTagHelper

def new
setting = Impasse::Setting.find_or_create_by_project_id(@project)

puts "<br><BR>

metodo NEW

setting.bug_tracker_id => #{setting.bug_tracker_id} params = #{params} "

unless setting.bug_tracker_id.nil?
unless @project.trackers.find_by_id(setting.bug_tracker_id).nil?
@issue.tracker_id = setting.bug_tracker_id
end
end

respond_to do |format|
format.html { render :partial => 'new' }
format.js { render :partial => 'issues/attributes' }
end
end

def put
begin

paramsExecStepHists = {test_steps_id: null,
test_plan_case_id: null,
issue_id: null,
author_id: null,
project_id: null,
tester_id: null,
build_id: null,
expected_date: null,
status: null,
executions_ts: null,
executor_id: null,
created_at: null,
updated_at: null}

ActiveRecord::Base.transaction do
puts "metodo put

#{params[:execution]}

"

@execution_history_step = Impasse::ExecStepHists.new(params[:execution])

puts "execution_history_step put

#{@execution_history_step}

"
@execution_history_step.save!
render :json => { :status => 'success', :message => l(:notice_successful_update) }
end
rescue
puts "

erro #{@execution_history_step} #{@execution_history_step}

"
render :json => { :status => 'error', :message => l(:error_failed_to_update), :errors => @execution_history_step }
end
# render_error l(:error_no_default_issue_status)
# if errors.empty?
# render :json => { :status => 'success', :message => l(:notice_successful_update) }
# else
# render :json => { :status => 'error', :message => l(:error_failed_to_update), :errors => errors }
# end
end

def put_step
begin

ActiveRecord::Base.transaction do
puts "metodo put_step

#{params[:execution]}

"

@execution_history_step = Impasse::ExecStepHists.new(params[:execution])

puts "execution_history_step put

#{@execution_history_step}

"
@execution_history_step.save!
render :json => { :status => 'success', :message => l(:notice_successful_update) }
end
rescue
puts "

erro #{@execution_history_step} #{@execution_history_step}

"
render :json => { :status => 'error', :message => l(:error_failed_to_update), :errors => @execution_history_step }
end
# render_error l(:error_no_default_issue_status)
# if errors.empty?
# render :json => { :status => 'success', :message => l(:notice_successful_update) }
# else
# render :json => { :status => 'error', :message => l(:error_failed_to_update), :errors => errors }
# end
end

def execution_step

@execution_bug_step = Impasse::ExecStepHist.new
@execution_bug_step.project = @project
@execution_bug_step.author = User.current
@execution_bug_step.execution_ts = Time.now.to_datetime
@execution_bug_step.executor_id = User.current.id
@execution_bug_step.test_steps_id = params[:test_step_id]
@execution_bug_step.test_plan_case_id = params[:test_plan_case_id]
@execution_bug_step.test_plan_case_id = params[:test_case_id]
@execution_bug_step.status = params[:test_step_status]

if @execution_bug_step.save
#execution_bug = self.new(:execution_id => params[:execution_bug][:execution_id], :bug_id => @issue.id)
flash[:notice] = l(:notice_successful_create)
respond_to do |format|
format.json { render :json => { :status => 'success'} }
#format.json { render :json => { :status => 'success', :issue_id => @issue.id } }
end
else
respond_to do |format|
format.json { render :json => { :status => 'error', :errors => @execution_bug_step.errors.full_messages } }
end
end
end

def create_step_bug
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })

if @issue.save
@execution_bug_step = Impasse::ExecStepHist.new
@execution_bug_step.project = @project
@execution_bug_step.author = User.current
@execution_bug_step.execution_ts = Time.now.to_datetime
@execution_bug_step.executor_id = User.current.id
@execution_bug_step.test_steps_id = params[:issue][:test_steps_id]
@execution_bug_step.test_plan_case_id = params[:issue][:test_plan_case_id]
@execution_bug_step.test_plan_case_id = params[:issue][:test_case_id]
@execution_bug_step.status = params[:issue][:test_step_status]
@execution_bug_step.issue_id = @issue.id

@execution_bug_step.save!

flash[:notice] = l(:notice_successful_create)
respond_to do |format|
format.json { render :json => { :status => 'success', :issue_id => @issue.id } }
end
else
respond_to do |format|
format.json { render :json => { :status => 'error', :errors => @issue.errors.full_messages } }
end
end
end

def upload_attachments
issue = Issue.find(params[:issue_id])
attachments = Attachment.attach_files(issue, params[:attachments])

respond_to do |format|
format.html { render :text => 'ok' }
end
end

def build_new_issue_from_params
if params[:id].blank?
@issue = Issue.new
@issue.copy_from(params[:copy_from]) if params[:copy_from]
@issue.project = @project
else
@issue = @project.issues.visible.find(params[:id])
end
@issue.project = @project # Tracker must be set before custom field values
@issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
if @issue.tracker.nil?
render_error l(:error_no_tracker_in_project)
return false
end

if params[:issue].is_a?(Hash)
@issue.safe_attributes = params[:issue]
if Redmine::VERSION::MAJOR == 1 and Redmine::VERSION::MINOR < 4
if User.current.allowed_to?(:add_issue_watchers, @project) && @issue.new_record?
@issue.watcher_user_ids = params[:issue]['watcher_user_ids']
end
end
end
@issue.start_date ||= Date.today
@issue.author = User.current
@priorities = IssuePriority.all
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
end

def check_for_default_issue_status
if IssueStatus.default.nil?
render_error l(:error_no_default_issue_status)
return false
end
end

def step_list

# puts "
#
# @execution_bug_step => exites? #{@execution_bug_step}
# {"test_plan_id"=>"1", "test_case_id"=>"3", "test_step_id"=>"2",
# "

sql = <<-END_OF_SQL
SELECT tb1.*, issues.author_id as bug_author_id,
issues.subject as bug_subject,
issues.description as bug_description,
issues.status_id,
issue_statuses.name as bug_status,
users.firstname as executor_firstname
FROM (SELECT impasse_exec_step_hists.*
FROM impasse_exec_step_hists
where test_steps_id=?) as tb1
left join issues on issues.id = tb1.issue_id
left join issue_statuses on issues.status_id = issue_statuses.id
left join users on users.id = tb1.executor_id
order by tb1.execution_ts desc
END_OF_SQL

@executionsHist= Impasse::ExecStepHist.find_by_sql [sql,params[:test_step_id]]

render :partial=>'list_edit'
end

def step_last

sql = <<-END_OF_SQL
SELECT impasse_exec_step_hists.*
FROM impasse_exec_step_hists
where id = (SELECT max(id)
FROM impasse_exec_step_hists
WHERE test_steps_id=?
)
END_OF_SQL

@executionsHistStepLast = Impasse::ExecStepHist.find_by_sql [sql,params[:test_step_id]]

respond_to do |format|
@executionsHistStepLast.each do |executionsHistStepLast|
format.json { render :json => { :status => 'success', :status_step => executionsHistStepLast.status , :test_steps_id => executionsHistStepLast.test_steps_id, :test_plan_case_id => executionsHistStepLast.test_plan_case_id, :issue_id => executionsHistStepLast.issue_id, :project_id => executionsHistStepLast.project_id } }
end
end
end
end
5 changes: 4 additions & 1 deletion app/controllers/impasse_execution_bugs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class ImpasseExecutionBugsController < ImpasseAbstractController

def new
setting = Impasse::Setting.find_or_create_by_project_id(@project)

puts "<br><BR> setting.bug_tracker_id => #{setting.bug_tracker_id} params = #{params} "

unless setting.bug_tracker_id.nil?
unless @project.trackers.find_by_id(setting.bug_tracker_id).nil?
@issue.tracker_id = setting.bug_tracker_id
Expand All @@ -38,7 +41,7 @@ def new
format.js { render :partial => 'issues/attributes' }
end
end

def create
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
if @issue.save
Expand Down
10 changes: 9 additions & 1 deletion app/controllers/impasse_executions_controller.rb
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ def index
end

def put
puts "<BR><BR>=====> #{params}<BR><BR>"
@node = Impasse::Node.find(params[:test_plan_case][:test_case_id])
puts "<BR><BR> @node.id =====> #{@node.id}<BR><BR>"
test_case_ids = (@node.is_test_case?) ? [ @node.id ] : @node.all_decendant_cases.collect{|tc| tc.id}
if params[:execution] and params[:execution][:expected_date]
params[:execution][:expected_date] = Time.at(params[:execution][:expected_date].to_i)
end

puts "<BR><BR>test_case_ids =====> #{test_case_ids}<BR><BR>"
status = 'success'
errors = []
for test_case_id in test_case_ids

test_plan_case = Impasse::TestPlanCase.find(:first, :conditions=>[
"test_plan_id=? AND test_case_id=?",
params[:test_plan_case][:test_plan_id],
test_case_id])
#puts "<BR><BR>test_plan_case.methods =====> #{test_plan_case.methods}<BR><BR>"
next if test_plan_case.nil?
execution = Impasse::Execution.find_or_initialize_by_test_plan_case_id(test_plan_case.id)
execution.attributes = params[:execution]
Expand All @@ -40,6 +44,9 @@ def put
execution.executor_id = User.current.id
end

puts "<BR><BR>params[:record] =====> #{params[:record]}<BR><BR>"

puts "<BR><BR>execution.attributes =====> #{execution.attributes}<BR><BR>"
begin
ActiveRecord::Base.transaction do
execution.save!
Expand Down Expand Up @@ -96,6 +103,7 @@ def edit
AND tpc.test_plan_id=? AND tpc.test_case_id=?)
END_OF_SQL
executions = Impasse::Execution.find_by_sql [sql, params[:test_plan_case][:test_plan_id], params[:test_plan_case][:test_case_id]]
# puts "<BR><BR>=====> #{params}<BR><BR>"
if executions.size == 0
@execution = Impasse::Execution.new
@execution.test_plan_case = Impasse::TestPlanCase.find_by_test_plan_id_and_test_case_id(
Expand Down
Loading