Problem following github master

Discussion forum about Anuko Time Tracker
Post Reply
dalescott
Posts: 54
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

Problem following github master

Post by dalescott » Thu Dec 28, 2017 9:33 am

Hi, I have been using v1.10.42.3627 downloaded from sourceforge and now want to now follow the master branch in the GitHub repo.

First I cloned the github repo. I diff’d the new config.php.dist with my existing config.php and didn’t notice anything new, so copied my existing config.php as-is to the cloned codebase and finally changed a softlink that points to the TimeTracker app directory that Apache serves. I and can login (and logout), but clicking on any internal item in the top menu results with “Error” “Access denied”.

Is it possible I missed some crucial step?

Cheers,
Dale
Last edited by dalescott on Thu Dec 28, 2017 8:36 pm, edited 1 time in total.

Nik
Posts: 419
Joined: Wed May 26, 2010 5:55 pm

Re: Problem following github master

Post by Nik » Thu Dec 28, 2017 2:00 pm

Try to do the last step in dbinstall.php "Update database structure (v1.6 to v1.9)" as there may be some missing fields in the database that are now required for it to work.

This label (1.9 part) is actually misleading, and should be changed to reflect the current version anyway.

dalescott
Posts: 54
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

Re: Problem following github master

Post by dalescott » Thu Dec 28, 2017 9:17 pm

Thanks @Nik. I browsed to my TT site, logged in, and manually browsed to dbinstall.php. I clicked the Update button for "Update database structure (v1.6 to v1.9)". The update transcript in the browser seemed to be mostly errors, but I browsed to the TT root page and all looks ok, including successfully edited a time entry. Can I tell from the log if the upgrade was performed successfully?

I'm also curious about versioning. Is there a separate app version (e.g. 1.13.0.3700) and database version (v1.9)? Is the revision change process documented somewhere?

I'll reply to the weekly thread after doing testing.

Cheers,
Dale

Code: Select all

Processing...

DROP TABLE IF EXISTS tt_invoice_headers

successful update

ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL

error: MDB2 Error: already exists

CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY  (`id`))

error: MDB2 Error: already exists

create index date_idx on tt_expense_items(date)

error: MDB2 Error: already exists

create index user_idx on tt_expense_items(user_id)

error: MDB2 Error: already exists

create index client_idx on tt_expense_items(client_id)

error: MDB2 Error: already exists

create index project_idx on tt_expense_items(project_id)

error: MDB2 Error: already exists

create index invoice_idx on tt_expense_items(invoice_id)

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports DROP sort_by

error: MDB2 Error: not found

ALTER TABLE tt_fav_reports DROP show_empty_days

error: MDB2 Error: not found

ALTER TABLE tt_invoices DROP discount

error: MDB2 Error: not found

ALTER TABLE tt_users ADD COLUMN `client_id` int(11) default NULL

error: MDB2 Error: already exists

ALTER TABLE tt_teams ADD COLUMN `decimal_mark` char(1) NOT NULL default '.'

error: MDB2 Error: already exists

ALTER TABLE tt_fav_reports ADD COLUMN `invoice` tinyint(4) default NULL

error: MDB2 Error: already exists

CREATE TABLE `tt_cron` (`id` int(11) NOT NULL auto_increment, `cron_spec` varchar(255) NOT NULL, `last` int(11) default NULL, `next` int(11) default NULL, `report_id` int(11) default NULL, `email` varchar(100) default NULL, `status` tinyint(4) default '1', PRIMARY KEY (`id`))

error: MDB2 Error: already exists

ALTER TABLE tt_cron ADD COLUMN `team_id` int(11) NOT NULL

error: MDB2 Error: already exists

create index client_idx on tt_client_project_binds(client_id)

error: MDB2 Error: already exists

create index project_idx on tt_client_project_binds(project_id)

error: MDB2 Error: already exists

ALTER TABLE tt_log ADD COLUMN status tinyint(4) default '1'

error: MDB2 Error: already exists

ALTER TABLE tt_custom_field_log ADD COLUMN status tinyint(4) default '1'

error: MDB2 Error: already exists

ALTER TABLE tt_expense_items ADD COLUMN status tinyint(4) default '1'

error: MDB2 Error: already exists

ALTER TABLE tt_invoices ADD COLUMN status tinyint(4) default '1'

error: MDB2 Error: already exists

DROP INDEX name_idx on tt_invoices

successful update

create unique index name_idx on tt_invoices(team_id, name, status)

successful update

ALTER TABLE tt_teams ADD COLUMN lock_spec varchar(255) default NULL

error: MDB2 Error: already exists

ALTER TABLE tt_teams DROP locktime

error: MDB2 Error: not found

CREATE TABLE `tt_monthly_quota` (`team_id` int(11) NOT NULL, `year` smallint(5) UNSIGNED NOT NULL, `month` tinyint(3) UNSIGNED NOT NULL, `quota` smallint(5) UNSIGNED NOT NULL, PRIMARY KEY (`year`,`month`,`team_id`))

successful update

ALTER TABLE `tt_monthly_quota` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE

error: MDB2 Error: can not create

ALTER TABLE `tt_teams` ADD `workday_hours` SMALLINT NULL DEFAULT '8' AFTER `lock_spec`

error: MDB2 Error: already exists

RENAME TABLE tt_monthly_quota TO tt_monthly_quotas

error: MDB2 Error: already exists

ALTER TABLE tt_expense_items modify `name` text NOT NULL

successful update

ALTER TABLE `tt_teams` ADD `uncompleted_indicators` SMALLINT(2) NOT NULL DEFAULT '0' AFTER `record_type`

error: MDB2 Error: already exists

CREATE TABLE `tt_predefined_expenses` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', PRIMARY KEY  (`id`))

error: MDB2 Error: already exists

ALTER TABLE `tt_teams` ADD `task_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`

successful update

ALTER TABLE `tt_teams` ADD `project_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`

successful update

ALTER TABLE `tt_cron` ADD `report_condition` varchar(255) default NULL AFTER `email`

successful update

ALTER TABLE `tt_fav_reports` ADD `status` tinyint(4) default '1'

successful update

ALTER TABLE `tt_teams` ADD `bcc_email` varchar(100) default NULL AFTER `uncompleted_indicators`

successful update

ALTER TABLE `tt_cron` ADD `cc` varchar(100) default NULL AFTER `email`

successful update

ALTER TABLE `tt_cron` ADD `subject` varchar(100) default NULL AFTER `cc`

successful update
done.

Nik
Posts: 419
Joined: Wed May 26, 2010 5:55 pm

Re: Problem following github master

Post by Nik » Fri Dec 29, 2017 6:59 pm

Errors in dbinstall.php are expected if you execute the steps multiple times. Look at the bottom of the log, some new modifications were executed successfully. This apparently was required for the new code to work.

Re: versioning - the only versioning we currently have is in WEB-INF/templates/footer.tpl - which sometimes gets out of sync. Not ideal, but still something.

Feel free to improve or suggest improvements.

dalescott
Posts: 54
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

Re: Problem following github master

Post by dalescott » Fri Dec 29, 2017 10:33 pm

Thanks @Nik. I see from footer.tpl that the displayed version is hard-coded. How do you determine a new version number? Do you use any workflow automation to update footer.tpl?

Code: Select all

...
      <table cellspacing="0" cellpadding="4" width="100%" border="0">
        <tr>
          <td align="center">&nbsp;Anuko Time Tracker 1.13.0.3700 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
            <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
            <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
            <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
          </td>
...

Nik
Posts: 419
Joined: Wed May 26, 2010 5:55 pm

Re: Problem following github master

Post by Nik » Sat Dec 30, 2017 3:20 pm

dalescott wrote:How do you determine a new version number? Do you use any workflow automation to update footer.tpl?
I do it manually.

The meanings of numbers are as follows:

1.13.2.3711 - major version, minor version with a database structure change, a bug fix or a similar improvement iteration, sequential "build" number meaning it is supposed to increment each time anything changes, not counting cosmetics.

Post Reply