1. 03 Sep, 2014 2 commits
    • Alex Vandiver's avatar
      Standardize on the stricter Encode::encode("UTF-8", ...) everywhere · 1d18663b
      Alex Vandiver authored
      This is not only for code consistency, but also for consistency of
      output.  Encode::encode_utf8(...) is equivalent to
      Encode::encode("utf8",...) which is the non-"strict" form of UTF-8.
      Strict UTF-8 encoding differs in that (from `perldoc Encode`):
      
          ...its range is much narrower (0 ..  0x10_FFFF to cover only 21 bits
          instead of 32 or 64 bits) and some sequences are not allowed, like
          those used in surrogate pairs, the 31 non-character code points
          0xFDD0 .. 0xFDEF, the last two code points in any plane (0xXX_FFFE
          and 0xXX_FFFF), all non-shortest encodings, etc.
      
      RT deals with interchange with databases, email, and other systems.  In
      dealing with encodings, it should ensure that it does not produce byte
      sequences that are invalid according to official Unicode standards.
      1d18663b
    • Alex Vandiver's avatar
      Always log bytes, not characters · a275a7fa
      Alex Vandiver authored
      Ensure that we always send UTF-8 encoded bytes to loggers, and not wide
      characters.  This is correctly done via an explicit call to
      Encode::encode, and not via checks of utf8::is_utf8 (which may be false
      for character strings with codepoints > 127 but < 256), and not via
      _utf8_off (which would fail similarly for such characters).
      a275a7fa
  2. 02 Sep, 2014 1 commit
  3. 28 Aug, 2014 1 commit
    • Kevin Falcone's avatar
      Allow modification of which types of links are shown · 191f789c
      Kevin Falcone authored
      There's a callback to add data at the end of the Links portlet, but
      nothing to allow you to change what's display.  This provides a callback
      that would let you remove (for example) the Parents from the listing, so
      that you can list them in a separate portlet later, with a custom
      display.
      191f789c
  4. 18 Aug, 2014 1 commit
  5. 06 Aug, 2014 1 commit
    • Kevin Falcone's avatar
      Allow @Groupings to be passed in · b1ba2c3d
      Kevin Falcone authored
      The display template (ShowCustomFieldCustomGroupings) takes Groupings as
      an argument, for symmetry, also take it during editing.
      
      This allows code to better control which groups are shown
      on Create or other editing pages (in particular, RTIR and the multitude
      of complex editing/creating pages in that workflow).
      b1ba2c3d
  6. 25 Jul, 2014 1 commit
  7. 09 Jul, 2014 1 commit
    • Alex Vandiver's avatar
      Drop the ineffective logo height and width configurations · 95530402
      Alex Vandiver authored
      The $LogoImageHeight and $LogoImageWidth configurations were only output
      on the <img> tag if the stock BPS logo was in use.  Additionally,
      however, those values were ignored by the browser, because every RT
      style sets:
      
          div#logo a img {
               height: 100% !important;
               width: auto !important;
          }
      
      ...which overrides explicit height="..." and width=".." attributes.
      
      Remove the configuration options which thus do not actually control
      anything.
      
      Fixes: I#26827
      95530402
  8. 16 Jun, 2014 2 commits
  9. 05 Jun, 2014 2 commits
    • Alex Vandiver's avatar
      Reuse existing validation in OCVF canonicalization · d0cef42f
      Alex Vandiver authored
      Rather than reiterate the logic in the canonicalization functions, use
      the error condition they return to determine the validation error.
      
      This also opens the door for invalid date and datetime fields to abort
      ticket updates, by providing a validation error if they do not parse.
      For backwards compatibility, this does not enforce such.
      d0cef42f
    • Alex Vandiver's avatar
      Reuse existing validation in OCVF canonicalization · 61c41182
      Alex Vandiver authored
      Rather than reiterate the logic in the canonicalization functions, use
      the error condition they return to determine the validation error.
      
      This also opens the door for invalid date and datetime fields to abort
      ticket updates, by providing a validation error if they do not parse.
      For backwards compatibility, this does not enforce such.
      61c41182
  10. 29 May, 2014 1 commit
    • Jim Brandt's avatar
      Hide empty transaction cfs via new ShowCustomFields option · 9ae058fa
      Jim Brandt authored
      As noted in the commit, 61a2dea4 removed code that had
      previously hidden transaction cfs with no value in the
      transaction history. Transaction cfs were shown for create,
      comment, and reply whether they had a value or not. After
      that commit, transaction CFs with no value are shown in
      every transaction (a label with (no value)).
      
      This commit explicitly adds back the hiding behavior to prevent
      repeatedly showing labels for empty CFs and cluttering the
      transaction history. However, this changes the behavior from
      RT 4.0 in that it also hides transaction cfs with no value on
      create, comment, and reply transactions also.
      
      Resolves issues ticket 29757
      9ae058fa
  11. 28 May, 2014 1 commit
  12. 27 May, 2014 4 commits
    • Alex Vandiver's avatar
      0174a258
    • Kevin Falcone's avatar
      Whitespace only change · 18526eba
      Kevin Falcone authored
      The previous commit removed an outer if block and pushed it into the
      boolean check of the elsif, leaving it weirdly indented.  This left
      shifts everything as a separate commit to make reading the previous code
      change clearer.
      18526eba
    • Kevin Falcone's avatar
      In 4.0, ShowTitleBarCommands didn't hide Outgoing Email links · 18957ceb
      Kevin Falcone authored
      The 4.2 equivalent ShowActions should be compatible for the places
      that want to suppress Reply/Comment/Forward.
      
      This makes the code change, leaves whitespace terrible.
      18957ceb
    • Kevin Falcone's avatar
      Assuming relative paths in ShowHistory breaks Approvals history display · 324e22d3
      Kevin Falcone authored
      Show Outgoing Email goes to /Approvals/ShowEmailRecord.html which
      doesn't exist.  Additionally, Reply/Comment/Forward are broken (although
      shouldn't be visible, fixed in a later commit).
      
      This also shows up in RTIR where links point to
      /RTIR/ShowEmailRecord.html and /RTIR/Attachments/
      
      Fixes issues 29800 and lays groundwork for a fix in RTIR for 29775.
      
      While you could list /Ticket/Update.html and /Ticket/Crypt.html for the
      6 *Path variables passed in %ARGS, it's nicer if you can just say "use
      everything from /Ticket/, like you used to in 4.0".
      
      Broken when moving to relative-by-default paths in 8274e2b6.
      
      Since /Elements/ShowHistory isn't directly callable and the JS helper doesn't
      pass extra arguments, there are currently no ways to pass a malicious
      PathPrefix in from user supplied data.
      324e22d3
  13. 21 May, 2014 1 commit
    • Wallace Reis's avatar
      I#28739: ScripStage leaks internal value · 8b21dd5d
      Wallace Reis authored
      Display Normal and Batch (and with disabled tag) instead of
      TransactionCreate and TransactionBatch in Queue's ColumnMap.
      
      Addtionally, factored the mapping out into RT::Scrip so that
      we could have a single place for this logic to be used both
      from form dropdown and collection listing.
      8b21dd5d
  14. 20 May, 2014 1 commit
    • Wallace Reis's avatar
      I#28787: Add Scrips menu · aa89bc9d
      Wallace Reis authored
      Add Scrips menu with 'Select' and 'Create' options. The 'Select' opt
      defaults to Admin/Scrips path unless the user comes from Global or
      Queue's Scrips listing page. The 'Create' one points to the same place
      for all cases, except it addes query params when from global or queue
      listing pages.
      aa89bc9d
  15. 15 May, 2014 3 commits
  16. 05 May, 2014 3 commits
  17. 03 May, 2014 1 commit
  18. 29 Apr, 2014 2 commits
    • Wallace Reis's avatar
      Collections - Align the attr label with row data · 48533498
      Wallace Reis authored
      Respect the "align" attribute, but to also fall back to the "align"
      value provided by the columnmap in cases where the format does not
      explicitly define one.
      
      This fixes especially the user collection listing page, but the other
      types searches will reap the benefits of the fix.
      48533498
    • Christian Loos's avatar
      fix owner dropdown warning for ticket search without queue clause · 55333243
      Christian Loos authored
      3056568f introduced switching to autocompleter if we have more than 50 owners.
      The commit missed that Search/Build.html (Search/Elements/PickBasics) also use
      the SelectOwner element and pass an empty Queues hash, if the query doesn't have
      a queue clause (which is the case if you create a new ticket search).
      In the above case the SelectOwner element pass an empty queue object as Objects
      to the SelectOwnerDropdown which results in loading every user with OwnTicket
      rights.
      
      This commit fixes "Use of uninitialized value in concatenation" warnings on
      ticket search without a queue clause in the query.
      It also avoids the "More than 50 possible Owners found ..." notice on new
      ticket search if you have more than 50 users with the OwnTicket right.
      55333243
  19. 25 Apr, 2014 2 commits
    • Alex Vandiver's avatar
      Remove duplicated MakeClicky documentation · 1f8ee986
      Alex Vandiver authored
      The docs added in 224edae0 were a merely a copy of the <%doc> block in /Elements/MakeClicky; stop forcing changes to be made in what are effectively two equal documents.  The docs/ version is POD-formatted, and more discoverable, so keep that copy.
      1f8ee986
    • Kevin Falcone's avatar
      Provide hook points to implement a MakeClicky cache. · 428ce8d9
      Kevin Falcone authored
      MakeClicky is very expensive on long tickets, but no single part of it
      is expensive.  Having to match against large blocks of text and dispatch
      to linking code just adds up slowly on long tickets. This provides rope
      so that a cache can be implemented.
      
      This is being tested in RTIR using mason file caching, but could easily
      have a plugin to enable it in core or to switch to using some other
      caching mechanism.
      428ce8d9
  20. 18 Apr, 2014 1 commit
  21. 16 Apr, 2014 1 commit
    • sunnavy's avatar
      check both of "-Values" and "-Value" to find default values in ValidateCustomFields · 8b8e1098
      sunnavy authored
      in 4b21442e, we refactored cf input name into a sub, which caused select cf
      current values "not selected" when cloning a ticket. see also #29751.
      
      turned out that we hardcoded "-Value" in the clone code before, which is not
      consistent with the cf default name. 4b21442e reveals a potential bug that we
      missed to check "-Values" in ValidateCustomFields.  this commit completes the
      check(i.e. to check both "-Values" and "-Value"), like what we do for
      $DECODED_ARGS in EditCustomField.
      8b8e1098
  22. 10 Apr, 2014 1 commit
  23. 09 Apr, 2014 2 commits
  24. 07 Apr, 2014 1 commit
    • Alex Vandiver's avatar
      Don't provide "new" as an id to skip · 080f69c8
      Alex Vandiver authored
      Postgres complains heartily if a limit contains a string for an integer
      column -- as happens if data-autocomplete-exclude is "new" and we
      attempt to exclude tickets matching that id.
      080f69c8
  25. 04 Apr, 2014 1 commit
    • Alex Vandiver's avatar
      Remove the session cache of the "RT at a Glance" portlet lists · 9582e25a
      Alex Vandiver authored
      The initial commit of "RT at a Glance" configurability (8b8e90dd) added a
      caching layer in the session, rather than hit the Attribute for the
      preferences on each request.  Remove this caching, in order to ensure
      that users who have not overridden the preference always get the most
      recent global configuration.  This comes at the cost of an extra 1-2
      Attribute queries on the front page, but as these are well-indexed, this
      negligable performance impact seems worth it to obey the principle of
      least surprise when the admin updates the global configuration.
      9582e25a
  26. 28 Mar, 2014 1 commit
  27. 20 Mar, 2014 1 commit