Test showing cf value is lost on refresh to add attachment
When on a separate history page, set the transaction DisplayPath to that page

DisplayPath controls where the per-txn anchors point, and we want to
stay on the history pages not jump to the record display pages.
Link user references to the User Summary page

The User Summary page is currently only available to Privileged users,
so we only generate links if the current user is privileged.

Nobody and RT_System are not linked.
Upgrade text-only user references to their HTML versions

Library code outside of Mason, such as RT::Transaction, shouldn't call
into /Elements/ShowUser.  To properly linkify those user references, we
wrap the text-only user reference in an HTML element which is replaced
by JavaScript on page load.
Use ShowUser in ColumnMap, to link to user summaries

This alters formats to use the user's preferred display format, instead
of hard-coding the user's email address (for AdminCcs, Ccs and
Requestors) or the users's name (for Owners).  This makes user display
generally more consistent, although in some use cases the RealName of
users may obscure which Name or EmailAddress is involved.
Link user summary in "More About Requestor"
Move "Modify this user" to a pagemenu on user summaries
Add a user format between concise and verbose based on Privileged

The "concise" format, when originally introduced in 07ec5dc, contained
similar logic which depended on the state of ->Privileged.  However,
this was removed in 20d879f, after it appeared to incur a notable
performance penalty.

However, upon closer analysis, much of the penalty was incurred by the
need to render the names of several hundred users for the ShowUser
dropdown -- a configuration which causes performance penalties
regardless.

At a possible minor performance cost, use the Privileged bit to control
how users are displayed.
Merge branch '4.2/deprecate-elements-titlebox'
Merge branch '4.2/columnmap-cf-warnings'
Calculate the duration of time worked for history display

Showing a useful duration is easier to quickly read and understand than
showing the before and after value in minutes.  Why subtract when the
computer can!
Merge branch '4.2/nobody-user-format'
Merge branch '4.2/link-user-summary'
Fix implementation of HasBookmark to not always return true

3cd39ce refactored HasBookmark into RT::User from RT::Ticket, but in
doing so inexplicably made it into a tautology; if any one ticket was
bookmarked, all tickets passed to HasBookmark would return true.

Return to the pre-3cd39ce logic, which is correct.
Default Domain to UserDefined, which is the only sane value
Update jsmin to fix minification bugs

Updates in ckeditor and jquery exposed bugs in the version of 2011-01-22
version of jsmin which 'make jsmin' installed.  Bump to the most recent
version, which generates JS which is not made of compilation errors.
add IsMerged boolean column to reflect id != EffectiveId

Most of queries on Tickets has id == EffectiveId condition
that is required to skip merged tickets. Usually percentage
of merged tickets is very low, so this condition is true.
However, DBs like Pg and Oracle estimate number of returned
records very wrong. Each column is very distinct and statisticly
speaking chance that one record has the same value in id and
EffectiveId is low, but this is only true when correlation
is not accounted and it's not accounted in mentioned DBs.

We add IsMerged column with "boolean" type that reflects
id != EffectiveId. It fixes estimations of DB optimizers.
Query execution plans get better.

Instead of adding the column we could use NULLs in EffectiveId
for records where now id = EffectiveId, but this means ORed
conditions in JOIN clause for rare queries. Tests show that
such solution result in terrible perfomance degradation on
mysql in these rare situations.
handle strings during upgrade of (Set,TimeWorked) txns

Pg and Oracle will stop update query if string can not
be converted to integer.

NewValue for (Set, TimeWorked) txns may contain string
if this DB was used with mysql and users entered strings
like "two days" as TimeWorked value. mysql just
converts string to 0 that end up in TimeWorked of a ticket,
but string as is ends up in transactions table.

For Pg/Oracle operation is just rejected and SetTimeWorked
fails.

Let's adjust upgrade SQL just in case RT was migrated from
mysql to Oracle/Pg.
Consistent transactions for all role group membership changes

A new transaction type, SetWatcher, is now created by single member role
groups when the assigned member changes.  SetWatcher is more useful than
a pair of Add/DelWatcher transactions since the old and new members are
on the same transaction object.  Such role groups which are also
denormalized into a column still record a Set <Column> transaction on
the record (i.e. tickets record a SetWatcher Owner and Set Owner
transaction for each Owner change).  While redundant on the surface, the
SetWatcher and Set transactions are distinct because they mark,
respectively, the group membership change and the record column change.

Add/DelWatcher is still used for all other role groups but is more
consistently set from deeper in the API: RT::Group->_Add/DeleteMember
creates the transactions instead of Add/DeleteRoleMember in the Roles
role.  Aside from greater consistency no matter which API method is
called, the move keeps all transaction creation alongside that of
SetWatcher and Set which must be in RT::Group.

Display of SetWatcher transactions is supported by core RT but not
currently used.  Without backdating new transactions to fill in existing
ticket history, it's impossible to solely use SetWatcher for ticket
owner history display.  Instead, displaying SetWatcher is skipped when
it applies to the Owner role on a ticket.  All other objects and roles,
such as those provided by extensions, will display SetWatcher
transactions.
Merge branch '4.2/watcher-transactions'