import xhiveframework


def get_context(context):
	context.no_cache = 1

	task = xhiveframework.get_doc("Task", xhiveframework.form_dict.task)

	context.comments = xhiveframework.get_all(
		"Communication",
		filters={"reference_name": task.name, "comment_type": "comment"},
		fields=["subject", "sender_full_name", "communication_date"],
	)

	context.doc = task
