recurring schedule template list, copy does not seem to work

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
scosaunders
Posts: 43
Joined: Thu Jul 17, 2008 7:05 pm

recurring schedule template list, copy does not seem to work

Post by scosaunders »

using version 2.2.12

On the recurring schedule template list, when selecting one of the recurring schedules (check box) and then clicking copy, I get sent to a blank white page and it does not seem to work. This is what is found in the address bar.

http://tatooine/timetrex_standard/inter ... er=&page=1

Not sure if this is a bug or what.
Last edited by scosaunders on Thu Sep 25, 2008 12:35 pm, edited 1 time in total.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please upgrade to the latest version of TimeTrex and see if the issue continues to happen.
scosaunders
Posts: 43
Joined: Thu Jul 17, 2008 7:05 pm

Post by scosaunders »

this issue persists in v2.2.14

PHP Fatal error: Class 'JobListFactory' not found in /var/www/default/timetrex_standard/classes/modules/schedule/RecurringScheduleTemplateFactory.class.php on line 357
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Thanks for providing us the exact error message, this issue will be fixed in the next version of TimeTrex.

In the mean time, if you edit /var/www/default/timetrex_standard/classes/modules/schedule/RecurringScheduleTemplateFactory.class.php around line 357 you will see a setJob function, if you replace the entire function with the following code:

Code: Select all

	function setJob($id) {
		$id = trim($id);

		if ( $id == FALSE OR $id == 0 OR $id == '' ) {
			$id = 0;
		}

		if ( getTTProductEdition() == TT_PRODUCT_PROFESSIONAL ) {
			$jlf = new JobListFactory();
		}

		if (  $id == NULL
				OR
				$this->Validator->isResultSetWithRows(	'job',
														$jlf->getByID($id),
														TTi18n::gettext('Job does not exist')
														) ) {
			$this->data['job_id'] = $id;

			return TRUE;
		}

		return FALSE;
	}

Down two more functions you will see the setJobItem function, replace it with this function as well:

Code: Select all

	function setJobItem($id) {
		$id = trim($id);

		if ( $id == FALSE OR $id == 0 OR $id == '' ) {
			$id = 0;
		}

		if ( getTTProductEdition() == TT_PRODUCT_PROFESSIONAL ) {
			$jilf = new JobItemListFactory();
		}

		if (  $id == NULL
				OR
				$this->Validator->isResultSetWithRows(	'job_item',
														$jilf->getByID($id),
														TTi18n::gettext('Job Item does not exist')
														) ) {
			$this->data['job_item_id'] = $id;

			return TRUE;
		}

		return FALSE;
	}
That should hopefully get the Schedule Template copy functionality working again.
Locked