Intranet Software, Extranet Software, Corporate Intranets & Extranets
Translations of this page:

Change the "Assigned" field value to "Reported by" field value

For basic information on plugins, please refer: Infocapture plugins

In this section we would see how to change the “Assigned” field value to the “Reported by” field value, if the value of the field “Reported on behalf of” is changed to a user other than the user reporting the issue

You can find the xml file of the form here:

Lets suppose we have this test project with ID = 34

To achive this we would require plugin_34_add_issue.php

<?php
function hd_plugin_34_add_issue($params)
{
	$issue_info = $params["issue"];
	$issue_fields = $params["issue"]["fields_values"];
	
	$reported_on = $issue_fields["reported_on"];
	$reporter = $issue_info["reporter"];
	
	$result["issue"] = array();
	if($reported_on != 1)
		$result["issue"]["assigned"] = $reporter;
 
	return $result;
}
?>

Place the above file in the folder: /httpdocs/intranet/helpdesk/plugins/

I have logged in as “Claromentis Administrator” and I am reporting on behalf of “User 1 TEST”.

After reporting the issue, the “Assigned” field value is set to the “Reported by” value (Claromentis Administrator over here)

 
help/infocapture/plugins/change_assign_to_field_value.txt · Last modified: 07/06/2011 04:49 by sweta
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki