Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Multiple Features #70

Merged
merged 26 commits into from

2 participants

@protich
Owner

Upgrader and db migrator
The upgrader now supports ability to monkey patch the database.

Unified ticket thread table
Messages, Response and Notes stored in one table.

Ticket events tracking
Track ticket events like Opened, Closed, Reopened, Overdue...etc

Advanced Ticket Search

greezybacon and others added some commits
@greezybacon greezybacon Track ticket owners at each tracked ticket event
Track assigned department, team, staff, and help topic when the ticket event
occurs. This will greatly help in correlation of various reports and queries

Also start plowing the way toward incremental database updates using a
patching technique. The hash of the main install SQL script for a respective
database will be used to track the signature of the database currently. The
signature will be stored in %config::schema_signature, and the main.inc.php
script can simply check the value in the schema against the value known to
the source code to be the signature the code expects. Should the two
signatures differ, patches in the setup/inc/sql/patches folder should exist
and be executed to assist in incrementally upgrading the database to the
new-current schema version.
a3b6e39
@protich protich Advanced search initial changes 32ed65d
@greezybacon greezybacon Merge ticket thread tables into one (1 of 2)
Replace the ticket_{message,response,note} tables with a single
ticket_thread table that will contain data for all three current message
types. This simplifies much of the ticket thread code and paves the way for
other types of messages in the future.
1899a6c
@greezybacon greezybacon Merge ticket thread tables into one (2 of 2)
Add SQL patch file and update the main install SQL (MySQL) script to
transfer messages, responses, and notes into the new ticket_thread table.
For new installations, transfer is not necessary because there are no
messages
abd6103
@greezybacon greezybacon Tell the installer about the new ticket_thread table 82eeb90
@protich protich Add upgrade capabilities to the setup wizard 4c0a79b
@protich protich Add pending upgrade check and auto offline when upgrade is pending 6329ab4
@protich protich Add auto-offline on pending upgrade 88520be
@protich protich Add pending upgrade check 550015d
@protich protich Merge branch 'feature/ticket-events' into feature/advanced-search ce4e58d
@protich protich Merge remote-tracking branch 'jared/feature/messages-single-table' in…
…to feature/advanced-search
4feeb82
@protich protich Merge branch 'feature/upgrader' into feature/advanced-search 4e545fa
@greezybacon greezybacon Add database migration helper
Implement attachment migration for attachments
Add support for more information stored about the patches in the individual
patche files with a Javadoc style syntax
881bb2a
@protich protich Fix SQL schema errors 153f0a7
@protich protich Enable debug mode during upgrade 4a409f8
@protich protich Update schema signature to the latest 09e8a9f
@protich protich Merge branch 'feature/upgrader' into feature/advanced-search f9aff6c
@protich protich DB migrater + enhancements cc4cd97
@protich protich Move Upgrader & Installer to indep. files 20e5b7f
@greezybacon

Regression: Should be PREFIX+ticket_thread { thread_type='M' } instead of ticket_message

also { message=... } => { body=... }

@protich
Owner

I hadn't merged the ticket thread branch - It's now merged.

@greezybacon
Owner

Advanced search works, database upgrader almost works. Please log errors to a log file for system admin review.

  • Try a fresh install
  • Run the lint test suite against the new stuff
setup/inc/class.upgrader.php
((117 lines not shown))
+
+ function getNextAction() {
+
+ $action='Upgrade osTicket to '.$this->getVersion();
+ if($this->getNumPendingTasks() && ($task=$this->getNextTask())) {
+ $action = $task['desc'];
+ if($task['status']) //Progress report...
+ $action.=' ('.$task['status'].')';
+ } elseif($this->isUpgradable() && ($nextversion = $this->getNextVersion())) {
+ $action = "Upgrade to $nextversion";
+ }
+
+ return $action;
+ }
+
+ function getNextStepInfo() {
@greezybacon Owner

This function is unused. Remove it

@protich Owner
protich added a note

Removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
include/ajax.tickets.php
((53 lines not shown))
+ $where.= ' OR (ticket.staff_id='.db_input($_REQUEST['staffId']). ' AND ticket.status="closed") ';
+
+ $where.= ' ) ';
+ } elseif($_REQUEST['staffId']) {
+ $where.=' AND (ticket.staff_id='.db_input($_REQUEST['staffId']).' AND ticket.status="closed") ';
+ }
+
+ //dates
+ $startTime =($_REQUEST['startDate'] && (strlen($_REQUEST['startDate'])>=8))?strtotime($_REQUEST['startDate']):0;
+ $endTime =($_REQUEST['endDate'] && (strlen($_REQUEST['endDate'])>=8))?strtotime($_REQUEST['endDate']):0;
+ if( ($startTime && $startTime>time()) or ($startTime>$endTime && $endTime>0))
+ $startTime=$endTime=0;
+
+ //Have fun with dates.
+ if($startTime)
+ $qwhere.=' AND ticket.created>=FROM_UNIXTIME('.$startTime.')';
@greezybacon Owner

Think you meant $where .= ...

@protich Owner
protich added a note

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@greezybacon
Owner

Once merged, create a new pull-request to add an 'annulled' column to the %ticket_event table and, when closed and reopened events are logged, annul the previous, opposite event if any. For instance, reopening a ticket should annul a previous closed event and visa-versa. This will greatly assist the reporting engine generate better statistics.

@protich
Owner

New install works : Installer completed with no errors - initial ticket got created as expected.
Inline Comments : Commit for the 2 inline comments pushed to the PR branch.

@greezybacon greezybacon merged commit 1e77eaa into osTicket:develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 6, 2012
  1. @greezybacon

    Track ticket owners at each tracked ticket event

    greezybacon authored
    Track assigned department, team, staff, and help topic when the ticket event
    occurs. This will greatly help in correlation of various reports and queries
    
    Also start plowing the way toward incremental database updates using a
    patching technique. The hash of the main install SQL script for a respective
    database will be used to track the signature of the database currently. The
    signature will be stored in %config::schema_signature, and the main.inc.php
    script can simply check the value in the schema against the value known to
    the source code to be the signature the code expects. Should the two
    signatures differ, patches in the setup/inc/sql/patches folder should exist
    and be executed to assist in incrementally upgrading the database to the
    new-current schema version.
Commits on Apr 9, 2012
  1. @protich
  2. @greezybacon

    Merge ticket thread tables into one (1 of 2)

    greezybacon authored
    Replace the ticket_{message,response,note} tables with a single
    ticket_thread table that will contain data for all three current message
    types. This simplifies much of the ticket thread code and paves the way for
    other types of messages in the future.
  3. @greezybacon

    Merge ticket thread tables into one (2 of 2)

    greezybacon authored
    Add SQL patch file and update the main install SQL (MySQL) script to
    transfer messages, responses, and notes into the new ticket_thread table.
    For new installations, transfer is not necessary because there are no
    messages
  4. @greezybacon
Commits on Apr 13, 2012
  1. @protich
  2. @protich
  3. @protich
  4. @protich

    Add pending upgrade check

    protich authored
  5. @protich
  6. @protich

    Merge remote-tracking branch 'jared/feature/messages-single-table' in…

    protich authored
    …to feature/advanced-search
  7. @protich
  8. @greezybacon

    Add database migration helper

    greezybacon authored
    Implement attachment migration for attachments
    Add support for more information stored about the patches in the individual
    patche files with a Javadoc style syntax
  9. @protich

    Fix SQL schema errors

    protich authored
  10. @protich
  11. @protich
  12. @protich
Commits on Apr 19, 2012
  1. @protich

    DB migrater + enhancements

    protich authored
  2. @protich
Commits on Apr 22, 2012
  1. @protich

    Add advanced ticket search

    protich authored
  2. @protich
  3. @protich

    Merge ticket_thread branch

    protich authored
Commits on Apr 23, 2012
  1. @protich

    Improve DB upgrader

    protich authored
  2. @protich
  3. @protich

    Fix $qwhere var

    protich authored
  4. @protich
Something went wrong with that request. Please try again.