lib/rally_user_helper.rb
# Checks to see if a user is a Team Member for a particular project
Checks to see if a user is a Team Member for a particular project
Checks to see if a user is a Team Member for a particular project
def is_team_member(project_oid, user)
      is_member = false
      return_value = "No"
      team_memberships = user["TeamMemberships"]
      if team_memberships != nil then
        team_memberships.each do |this_membership|
          this_membership_oid = get_membership_oid_from_membership(this_membership)
          if this_membership_oid == project_oid then
            is_member = true
          end
        end
      end
      if is_member then return_value = "Yes" end
      return return_value
  end
def is_team_member ( project_oid , user ) is_member = false return_value = "No" team_memberships = user [ "TeamMemberships" ] if team_memberships != nil then team_memberships . each do | this_membership | this_membership_oid = get_membership_oid_from_membership ( this_membership ) if this_membership_oid == project_oid then is_member = true end end end if is_member then return_value = "Yes" end return return_value end
Checks to see if a user is a Team Member for a particular project
Checks to see if a user is a Team Member for a particular project
# Default values # First check if team_memberships are nil then loop through and look for a match on # Project OID # Grab the Project OID off of the ref URL
project_oid
user