xowf::test_item::Answer_manager method last_time_in_state (public)

 <instance of xowf::test_item::Answer_manager[i]> last_time_in_state \
    -state state  revision_sets

Defined in packages/xowf/tcl/test-item-procs.tcl

Loops through revision sets and retrieves the latest date where state is equal the specified value.

Switches:
-state
(required)
Parameters:
revision_sets - a list of ns_sets containing revision data. List is assumed to be sorted in descending creation_date order (as retrieved by get_revision_sets)
Returns:
a date

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc last_time_in_state xowf::test_item::Answer_manager instproc last_time_in_state test_create_test_items->xowf::test_item::Answer_manager instproc last_time_in_state

Testcases:
create_test_items
Source code:
set result ""
foreach ps $revision_sets {
  if {$state eq [ns_set get $ps state]} {
    set result [ns_set get $ps last_modified]
  }
}
return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: