lib/rally_user_helper.rb
def refresh_user(name)
      single_user_query = RallyAPI::RallyQuery.new()
      single_user_query.type = :user
      single_user_query.fetch = @detail_user_fetch
      single_user_query.page_size = 200 #optional - default is 200
      single_user_query.limit = 90000 #optional - default is 99999
      single_user_query.order = "UserName Asc"
      single_user_query.query_string = "(UserName = \"" + name + "\")"

      query_results = @rally.find(single_user_query)
      if query_results.total_result_count == 0
        return nil
      else
        # Cache user for use next time
        this_user = query_results.first
        @cached_users[this_user["UserName"].downcase] = this_user
        @logger.info "Refreshed User: #{this_user.UserName}"

        return this_user
      end
    end
# Needed to refresh user object after updates, since user cache is stale after
# user settings are changed by the helper
Needed to refresh user object after updates, since user cache is stale after
user settings are changed by the helper
Needed to refresh user object after updates since user cache is stale after user settings are changed by the helper
def refresh_user(name)
      single_user_query = RallyAPI::RallyQuery.new()
      single_user_query.type = :user
      single_user_query.fetch = @detail_user_fetch
      single_user_query.page_size = 200 
      single_user_query.limit = 90000 
      single_user_query.order = "UserName Asc"
      single_user_query.query_string = "(UserName = \"" + name + "\")"
      query_results = @rally.find(single_user_query)
      if query_results.total_result_count == 0
        return nil
      else
        this_user = query_results.first
        @cached_users[this_user["UserName"].downcase] = this_user
        @logger.info "Refreshed User: #{this_user.UserName}"
        return this_user
      end
    end
def refresh_user ( name ) single_user_query = RallyAPI :: RallyQuery . new ( ) single_user_query . type = :user single_user_query . fetch = @detail_user_fetch single_user_query . page_size = 200 single_user_query . limit = 90000 single_user_query . order = "UserName Asc" single_user_query . query_string = "(UserName = \"" + name + "\")" query_results = @rally . find ( single_user_query ) if query_results . total_result_count == 0 return nil else this_user = query_results . first @cached_users [ this_user [ "UserName" ] . downcase ] = this_user @logger . info "Refreshed User: #{this_user.UserName}" return this_user end end
Needed to refresh user object after updates, since user cache is stale after
user settings are changed by the helper
Needed to refresh user object after updates since user cache is stale after user settings are changed by the helper
#optional - default is 200 #optional - default is 99999 # Cache user for use next time
name