def print_modifiers_and_transfer_info(actpacks, left_status_time, right_status_time, title, answer, is_rej):
	global has_output
	# get the range of indexes of wanted activities
	[left, right] = lib3.find_info_within_time_range(actpacks, get_time, left_status_time, right_status_time)
	# TODO: make sure what would happend if left == -1
	if left != -1:
		# find activities
		for index in range(left, right):
			login = actpacks[index].login
			time = actpacks[index].when
			new = actpacks[index].value
			old = '---'
			# get the old value
			if index > 0:
				old = actpacks[index-1].value
				has_output = True
				# ignore the assignments because of product convertion
				if not convertion.is_correct(old, new):
					print bug_id + lib.sep + title + lib.sep + login + lib.sep + str(time) + lib.sep + old + lib.sep + new + lib.sep + answer
	# status transfer triage
	# only consider confirmed as activity
	if is_rej:
		return
	new_index = lib3.binary_search(actpacks, get_time, right_status_time)
	new = actpacks[new_index].value
	old = new
	has_output = True
	print bug_id + lib.sep + title + lib.sep + status_login + lib.sep + str(right_status_time) + lib.sep + old + lib.sep + new + lib.sep + answer
Example #2
0
def print_modifiers_and_transfer_info(actpacks, left_status_time,
                                      right_status_time, title, answer, is_rej,
                                      products):
    [left, right] = lib3.find_info_within_time_range(actpacks, get_time,
                                                     left_status_time,
                                                     right_status_time)
    if left != -1:
        # has version activities
        for index in range(left, right):
            login = actpacks[index].login
            time = actpacks[index].when
            # find product value at that time
            product_index = lib3.binary_search(products, get_time, time)
            product_value = products[product_index].value
            new = actpacks[index].value
            old = '---'
            if index > 0:
                old = actpacks[index - 1].value
                print bug_id + lib.sep + title + lib.sep + login + lib.sep + str(
                    time
                ) + lib.sep + old + lib.sep + new + lib.sep + answer + lib.sep + product_value
    if is_rej:
        return
    # status transfer triage
    new_index = lib3.binary_search(actpacks, get_time, right_status_time)
    new = actpacks[new_index].value
    # finad product value at that time
    product_index = lib3.binary_search(products, get_time, right_status_time)
    product_value = products[product_index].value
    old = new

    print bug_id + lib.sep + title + lib.sep + status_login + lib.sep + str(
        right_status_time
    ) + lib.sep + old + lib.sep + new + lib.sep + answer + lib.sep + product_value
Example #3
0
def print_modifiers_and_transfer_info(actpacks, left_status_time, right_status_time, title, answer, is_rej, products):
	[left, right] = lib3.find_info_within_time_range(actpacks, get_time, left_status_time, right_status_time)
	if left != -1:
		# has version activities
		for index in range(left, right):
			login = actpacks[index].login
			time = actpacks[index].when
			# find product value at that time
			product_index = lib3.binary_search(products, get_time, time)
			product_value = products[product_index].value
			new = actpacks[index].value
			old = '---'
			if index > 0:
				old = actpacks[index-1].value
				print bug_id + lib.sep + title + lib.sep + login + lib.sep + str(time) + lib.sep + old + lib.sep + new + lib.sep + answer + lib.sep + product_value
	if is_rej:
		return
	# status transfer triage
	new_index = lib3.binary_search(actpacks, get_time, right_status_time)
	new = actpacks[new_index].value
	# finad product value at that time
	product_index = lib3.binary_search(products, get_time, right_status_time)
	product_value = products[product_index].value
	old = new

	print bug_id + lib.sep + title + lib.sep + status_login + lib.sep + str(right_status_time) + lib.sep + old + lib.sep + new + lib.sep + answer + lib.sep + product_value
Example #4
0
def print_modifiers_and_transfer_info(actpacks, left_status_time, right_status_time, title, answer):
	[left, right] = lib.find_info_within_time_range(actpacks, get_time, left_status_time, right_status_time)
	if left != -1:
		# has version activities
		for index in range(left, right):
			login = actpacks[index].login
			time = actpacks[index].when
			new = actpacks[index].value
			old = '---'
			if index > 0:
				old = actpacks[index-1].value
				print bug_id + ';' + title + ';' + login + ';' + str(time) + ';' + old + ';' + new + ';' + answer
	# status transfer triage
	new_index = lib.binary_search(actpacks, get_time, status_time)
	new = actpacks[new_index].value
	old = new
	print bug_id + ';' + title + ';' + status_login + ';' + str(status_time) + ';' + old + ';' + new + ';' + answer
Example #5
0
def print_modifiers_and_transfer_info(actpacks, left_status_time,
                                      right_status_time, title, answer):
    [left, right] = lib.find_info_within_time_range(actpacks, get_time,
                                                    left_status_time,
                                                    right_status_time)
    if left != -1:
        # has version activities
        for index in range(left, right):
            login = actpacks[index].login
            time = actpacks[index].when
            new = actpacks[index].value
            old = '---'
            if index > 0:
                old = actpacks[index - 1].value
                print bug_id + ';' + title + ';' + login + ';' + str(
                    time) + ';' + old + ';' + new + ';' + answer
    # status transfer triage
    new_index = lib.binary_search(actpacks, get_time, status_time)
    new = actpacks[new_index].value
    old = new
    print bug_id + ';' + title + ';' + status_login + ';' + str(
        status_time) + ';' + old + ';' + new + ';' + answer