Call Us:

  • +1 212 386 5676
  • +44 (0)1273 666 355
  • +61 (0)3 9682 2441
  • +7 383 332 40 55
Intranet & Extranet Manager: An integrated platform that will grow with your business
Translations of this page:

Change the STATUS field value depending on certain condition

For basic information on plugins, please refer: Infocapture plugins

In this section we would see how to change STATUS field value depending on the number entered in the text box

You can find the xml file of the test project here:

Lets suppose we have this test project with ID = 35

Lets suppose there are three STATUSES: Less, Equal, Greater. If the number entered is less than 100, STATUS = Less. If the number is equal to 100, STATUS = Equal else STATUS = Greater.

To achive this we would require plugin_35_add_issue.php

<?php
function hd_plugin_35_add_issue($params)
{
	$project_info = $params["project"];
	$issue_info = $params["issue"];
	$issue_fields = $params["issue"]["fields_values"];
	
	$number = $issue_fields["enter_number"];
	$result["issue"] = array();
	if($number < 100)
		$result["issue"]["status"] = 1;
	elseif($number == 100)
		$result["issue"]["status"] = 2;
	else
		$result["issue"]["status"] = 3;
	
	return $result;
}
?>

Here I have entered number 45, STATUS is set to Less

 
help/infocapture/plugins/change_status.txt · Last modified: 26/08/2009 06:41 by sweta
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki