vTiger – deutsche Auswahllisten sortieren

  • Beitrags-Autor:
  • Beitrags-Kategorie:EDV / vTiger
  • Beitrags-Kommentare:2 Kommentare

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Hallo Zusammen,

Heute soll es wiedereinmal um das CRM vTiger gehen. Dieses hat sich in letzter Zeit bei mir wirklich beliebt gemacht, da auch eine aktive Entwicklung zu erkennen ist. Unter anderem wird im Juli 2011 die nächste Version mit vielen wichtigen und dringend benötigten Features veröffentlicht. So ist zumindestens der Plan. 🙂 Ob dieser eingehalten wird, werden wir noch sehen.

Langsam aber sicher verstehe ich auch das System hinter vTiger und meine Anpassungen laufen immer besser.

Nach einer Anfrage habe ich mich mit dem Thema der Sortierung von Auswahllisten in der deutschen Sprache beschäftigt.
Diese werden, wie anderen vTiger Nutzern sicherlich schon aufgefallen ist, zwar übersetzt, aber weiterhin nach den englischen Wortlauten sortiert. Das führt nicht selten zu kompletten Scans der Listen durch die Mitarbeiter. => zeitraubend

Damit diese Listen in Zukunft nach Ihrem deutschem Wortlaut sortiert werden, sind folgende zwei kleine Anpassungen notwendig:

/include/utils/EditViewUtils.php [~Line 225]

Suchen:

$fieldvalue [] = $options;

Zuvor einfügen:

/** 2011-06-01 Update1  PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if($fieldname != "eventstatus" && $fieldname != "leadstatus") {
 usort($options, "sortoptions");
}
/** MODIFIED BY SWARNAT ENDE **/

Ganz am Ende der Datei einfügen:

/** 2011-06-01 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
/**
 * Diese Funktion sortiert die von vTiger erstellten Options-Einträge nach der deutschen Einträge
 * @author Stefan Warnat <ich@stefanwarnat.de>
 */
function sw_sortOptions($a, $b) {
 if(strtolower($a[0]) == strtolower($b[0])) return 0;
 return (strtolower($a[0])<strtolower($b[0]))?-1:1;
}
/** MODIFIED BY SWARNAT ENDE **/

/include/utils/DetailViewUtils.php

Suchen: [~Line 219, innerhalb „if(uitype == 15) {„]

$label_fld ["options"] = $options;

Zuvor einfügen:

/** 2011-06-01 Update1  PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if($fieldname != "eventstatus" && $fieldname != "leadstatus") {
          usort($options, "sw_sortOptions_detail");
}
/** MODIFIED BY SWARNAT ENDE **/

Suchen: [~Line 329, innerhalb „if(uitype == 33) {„]

$label_fld ["options"] = $options;

Zuvor einfügen:

/** 2011-06-01 Update1  PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if($fieldname != "eventstatus" && $fieldname != "leadstatus") {
          usort($options, "sw_sortOptions_detail");
}
/** MODIFIED BY SWARNAT ENDE **/

Ganz am Ende der Datei einfügen:

/** 2011-06-01 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
/**
 * Diese Funktion sortiert die von vTiger erstellten Options-Einträge nach der deutschen Einträge
 * @author Stefan Warnat <ich@stefanwarnat.de>
 */
function sw_sortOptions_detail($a, $b) {
 if(strtolower($a[0]) == strtolower($b[0])) return 0;
 return (strtolower($a[0])<strtolower($b[0]))?-1:1;
}
/** MODIFIED BY SWARNAT ENDE **/

Getestet habe ich diese Erweiterung nur flüchtig, sprich in Leads, Accounts und Contacts und sie lief.

Vielleicht ist diese kleine Erweiterung für den einen oder anderen ja doch nützlich und Sie wird eingesetzt.

Bis zum nächsten Post,

Stefan

UPDATE

Durch einen Hinweis sind noch zwei Optimierungen zu dieser Änderung hinzugekommen. Zum einen, wurde der Eventstatus und der Leadstatus unsortiert belassen, da an dieser Stelle der Ablauf abgebildet ist.

Zum anderen wurden die Listen in der Live Bearbeiten bisher Funktion nicht sortiert. Dieser Umstand wurde jetzt auch geändert.

Dieser Beitrag hat 2 Kommentare

  1. Stefan Warnat

    Hy,
    Ich habe über diesen Schritt noch garnicht nachgedacht, wenn ich ehrlich bin.
    Mir hat bisher aber auch etwas die Zeit gefehlt, die Patches aufzubereiten.

    Aber da ich ich mit meinen Tests für vTiger 5.3 sowieso ins SVN Geschäft einsteigen muss, wird das wohl demnächst etwas werden.
    Auf jeden fall vielen Dank für die Links!

    stefan

Schreibe einen Kommentar