You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Allgemeine Konfiguration

Bei dem JIRA Benutzer mit dem sich das OTRS anmeldet sollte darauf geachtet werden, dass die Sprache auf Englisch eingestellt ist.

Aktivieren Sie Remote-API-Aufrufe in den JIRA Systemeinstellungen im Administrationsbereich um JIRA Vorgänge aus OTRS heraus anzulegen!!!

Konfigurationsdatei

OTRS und JIRA müssen separat konfiguriert werden.

Das Plugin lässt sich über die Konfigurationsdatei 'otrsintegration.properties' anpassen.

Hier müssen unter anderem die URL des OTRS-Systems und die Anmeldedaten angegeben werden.

Wenn die Datei bearbeitet wurde sollte das Plugin einmal deaktiviert und dann wieder aktiviert werden um sicherzustellen, dass die Einstellungen übernommen wurden.

Unterhalb hiervon steht ein Beispiel dieser Datei, inklusive Kommentaren.

Die Konfigurationsdatei muss im conf Ordner unter dem JIRA-Datenverzeichnis platziert werden.

Um das JIRA-Datenverzeichnis aus dem JIRA heraus zu ermitteln:

  • nach Administration > Systeminformationen gehen
  • den 'Dateipfade' Bereich finden
  • dort gibt es den Eintrag 'Adresse der lokalen JIRA-Startseite'

Beispiele:

  • wenn das JIRA-Datenverzeichnis unter /opt/jira_data zu finden ist, ist der Ort für die Konfigurationsdatei /opt/jira_data/conf
  • oder wenn das JIRA-Datenverzeichnis unter C:\jira\home zu finden ist, ist der Ort für die Konfigurationsdatei C:\jira\home\conf

Sobald das Plugin installiert ist und keine Konfigurationsdatei gefunden werden konnte wird auch eine Fehlermeldung in der Log-Datei ausgegeben mit dem erwarteten Ort.

otrsintegration.properties
# OTRS CONNECTION SETTINGS

# The SOAP URL of the OTRS server, e.g. http://localhost/otrs
OTRSURL=http://localhost/otrs

# The URL of the OTRS server for the Link in JIRA. Leave empty to use the above.
OTRSURL_FORLINK=

# Specify the username for updating issues in OTRS.
OTRS_SOAP_USERLOGIN=root@localhost

# Specify the password for updating issues in OTRS.
OTRS_SOAP_PASSWORD=root


# SPECIAL FIELDNAMES

# JIRA Customfield name or ID holding the OTRS ticket ID, e.g. OTRSTicketID
OTRSKEY=OTRSTicketID

# OTRS Dynamicfield name holding the JIRA issue ID, e.g. JIRAIssueID
JIRAKEY=JIRAIssueID


# JIRA FILTER SETTINGS

# Enter a list of project keys, comma separated, that are used to filter the issues 
# for those given projects. Leave empty to disable the filter and send mail for all projects.
OTRS_PROJECT_FILTER=TEST,OTH

# Specify one or more special JIRA user. When this user creates or changes an issue the 
# OTRS ticket will not be updated. This should in particular include the JIRA user used 
# by OTRS to update or create issues. 
JIRA_SPECIAL_USER=otrs2jira


# OTRS DEFAULT VALUES

# Specify the email address for updating issues in OTRS. This will only be used when 
# the JIRA user has not specified one.
OTRS_SOAP_FROM=me@mail.org

# Default values for creating an OTRS Ticket from JIRA. These will be overwritten 
# by possible mappings. 
OTRS_DEFAULT_CUSTOMER=Testcustomer
OTRS_DEFAULT_QUEUE=Raw
OTRS_DEFAULT_STATE=new
OTRS_DEFAULT_PRIORITYID=3

# Default TimeUnit value for creating an OTRS Article. This will be overwritten by entered
# values (if enabled). Empty values will not be transfered.
OTRS_DEFAULT_TIME_UNIT=

# Prefix for the OTRS subject field, this will be added to all articles created by JIRA.
# You can use a space at the end of the prefix.
OTRS_SUBJECT_PREFIX=[JIRA] 


# JIRA WORKFLOW SETTINGS

# Event name for the OTRS workflow commented event, e.g. OTRS_COMMENTED_EVENT. 
# Only required if a separate workflow transition with event is used for commenting 
# an issue. Also see the option regarding standard events below.
OTRS_COMMENTED_EVENT=OTRS_COMMENTED_EVENT

# Event name for the OTRS workflow resolved event, e.g. OTRS_RESOLVED_EVENT. 
# Also see the option regarding standard events below.
OTRS_RESOLVED_EVENT=OTRS_RESOLVED_EVENT

# Event name for the OTRS workflow closed event, e.g. OTRS_CLOSED_EVENT. 
# Also see the option regarding standard events below.
OTRS_CLOSED_EVENT=OTRS_CLOSED_EVENT

# Set to true, if you also want actions upon standard events on an issue. Use this, 
# when you do not want or cannot change the workflow events. Set to false otherwise.
OTRS_USE_STD_EVENTS=true


# COMMENT SETTINGS

# Specify whether JIRA standard comments should be transferred to OTRS (true/false)
JIRA_COMMENTS_ARE_TRANSFERED_TO_OTRS=true

# Specify whether the OTRS Comment Action shows an input field for TimeUnit (true/false)
OTRS_COMMENT_WITH_TIME_UNIT=false
# Specify whether the TimeUnit field is required for the OTRS Comment Action (true/false)
OTRS_COMMENT_WITH_TIME_UNIT_REQUIRED=false


# CREATE OTRS TICKET ACTION SETTINGS

# JIRA Customfield name or ID holding the OTRS queue (used by the Create OTRS Ticket Action)
CUSTOMFIELD_OTRS_QUEUE=Queue
# JIRA Customfield name or ID holding the OTRS customer (used by the Create OTRS Ticket Action)
CUSTOMFIELD_OTRS_CUSTOMER=Customer
# If this is set to false the link to the Create OTRS Ticket Action will not be shown and the 
# action won't work
CREATE_OTRS_TICKET_ACTION_IS_ACTIVE=true
# If this is set to true the customer and queue on the Create OTRS Ticket Action will be read-only
CREATE_OTRS_TICKET_ACTION_IS_READONLY=false

# MAPPING SETTINGS

# Mappings from JIRA to OTRS.
# A number like in "cust_10100" will be treated as a customfield ID

# Mappings from JIRA fields to OTRS Text/Textarea/Dropdown fields
MAPPINGS=1,2,4,5,8,9,10
# Mappings from JIRA Date/Time or Date fields to OTRS Date/Time fields
DATE_TIME_MAPPINGS=6
# Mappings from JIRA Date/Time or Date fields to OTRS Date fields
DATE_MAPPINGS=7

# The actual mappings, if the mapping ID is not listed above it will be ignored
MAPPING_1=std_priority,dyn_jirapriority
MAPPING_2=cust_10700, dyn_jiramail
MAPPING_4=std_components,dyn_JiraComponents
MAPPING_5=std_fixForVersion,dyn_JiraFixVersions
MAPPING_6=std_created,dyn_SomeDate
MAPPING_7=cust_Date,dyn_AnotherDate
MAPPING_8=cust_Textarea,dyn_Textarea
MAPPING_9=cust_Dropdown,dyn_Dropdown
MAPPING_10=cust_OtrsOwner,std_owner


# Mapping prefixes you can use (case sensitive):
# MAPPING_PREFIX = MAPPING_
# CUSTOMFIELD_PREFIX = cust_
# DYNAMICFIELD_PREFIX = dyn_
# STANDARD_FIELD_PREFIX = std_

# OTRS standard field names you can use (not case sensitive):
# queue
# title
# type
# service
# sla
# state
# priority
# owner
# responsible
# customerUser

# JIRA standard field names you can use (not case sensitive):
# summary
# type
# reporter
# priority
# description
# key
# status
# assignee
# resolution
# votes
# id
# watches
# project
# timespent
# timeestimate
# timeoriginalestimate
# created
# updated
# duedate
# resolutiondate
# security
# environment
# components
# fixForVersion

Die obige Konfigurationsdatei ist ein Beispiel. Bitte alle relevanten Werte so setzen, dass sie ihrer Umgebung entsprechen. Insbesondere sollten die Beispiel-Mappings entfernt werden:


 

# Mappings from JIRA fields to OTRS Text/Textarea/Dropdown fields
MAPPINGS=
# Mappings from JIRA Date/Time or Date fields to OTRS Date/Time fields
DATE_TIME_MAPPINGS=
# Mappings from JIRA Date/Time or Date fields to OTRS Date fields
DATE_MAPPINGS=
Felder

Weiter müssen folgende Felder angelegt werden wenn sie noch nicht existieren:

  • ein Customfield für die OTRS Ticket ID (Type: Text Field (read only)), dessen Name dem unter "OTRSKEY" hinterlegten Wert entspricht
  • jeweils ein Customfield für den OTRS Kunden (Type: Select List (single choice)) und die Queue (Type: Select List (single choice)) (siehe Postfunction und Action 'Erzeuge OTRS Ticket')
  • im OTRS ein Dynamicfield für die JIRA Issue ID, dieses sollte bei der Installation des OTRS Plugins automatisch erzeugt worden sein; der Name ('JIRAIssueID') muss dem unter "JIRAKEY" hinterlegten Wert entsprechen
  • alle in den Mappings angegebenen Felder sollte es auch tatsächlich geben, insbesondere die OTRS Felder
    • Mappings mit nicht vorhandenen JIRA Feldern werden ignoriert
    • Mappings auf nicht existente OTRS Felder führen zu Fehlern!
Mapping
  • Für das Mapping auf OTRS Standardfelder lassen sich die folgenden Bezeichner benutzen (diese sind auch in der Konfigurations-Datei aufgeführt):

    Keys für OTRS Standard Felder
    queue
    title
    type
    service
    sla
    state
    priority
    owner
    responsible
    customerUser
  • Um auf Dynamische Felder zu mappen muss der OTRS interne Name benutzt werden.
  • Für JIRA Customfields kann sowohl der Name wie auch die ID verwendet werden.
  • Es lassen sich folgende JIRA Standard Feldern im Mapping benutzen und ins OTRS übertragen:

    Keys für JIRA Standard Felder
    summary
    type
    reporter
    priority
    description
    key
    status
    assignee
    resolution
    votes
    id
    watches
    project
    timespent
    timeestimate
    timeoriginalestimate
    created
    updated
    duedate
    resolutiondate
    security
    environment
    components
    fixForVersion 

    Wenn Sie den Bearbeiter des JIRA Tickets nach OTRS mappen wollen, müssen Sie sicherstellen, dass im OTRS ein Benutzer mit dem selben Namen existiert. Wenn nicht zugeordnete Tickets erlaubt sind sollten Sie zusätzlich einen Benutzer mit dem Namen "-". Das Mapping dafür wäre zum Beispiel std_assignee,std_responsible.

Feld-Typen im Mapping

Momentan können im OTRS folgende Feld-Typen befüllt werden:

  • Text
  • Textfeld
  • Datum / Zeit
    • das JIRA Feld von dem gemappt wird sollte auch vom Typen 'Datum / Zeit' oder 'Datum' sein oder es muss anderweitig sicher gestellt werden, dass nur etwas vom Format 'YYYY-MM-DD hh:mm:ss' übertragen wird
    • ist das JIRA Feld leer wird nichts übertragen
  • Datum
    • das JIRA Feld von dem gemappt wird sollte auch vom Typen 'Datum' oder 'Datum / Zeit' sein oder es muss anderweitig sicher gestellt werden, dass nur etwas vom Format 'YYYY-MM-DD 00:00:00' übertragen wird
    • ist das JIRA Feld leer wird nichts übertragen
  • Einfachauswahl
    • für den Fall das die Optionen aus dem OTRS zurück übertragen werden sollen muss sichergestellt werden, dass die JIRA Optionen mit den OTRS Keys (nicht den Values) übereinstimmen

Aus dem JIRA können sämtliche standard Feld-Typen ausgelesen werden. Beim Auslesen von Mehrfachauswahlfeldern sowie den Komponenten und Versionen werden alle Einträge in einer kommaseparierten Liste übergeben.

Listener

Keine spezielle Konfiguration nötig.

Postfunctions

Es stehen folgende Postfunctions zur Verfügung:

Create Otrs Ticket

Mit der 'Create Otrs Ticket' Postfunction kann ein OTRS Ticket erzeugt werden. Soll die Postfunction genutzt werden muss diesem einem Workflow hinzugefügt werden. Dann lassen sich die Customfields für den OTRS Kunden und die Queue auswählen:

Update Otrs Ticket

Um das OTRS Ticket zu aktualisieren steht die 'Update Otrs Ticket' Postfunction zur Verfügung.

Beim Hinzufügen der Postfunction kann der Namen der Queue angeben werden, in die das Ticket verschoben werden soll. Es kann entweder der Name oder die ID des neuen OTRS Status eingetragen werden. Außerdem kann auch die Übertragung aller Felder im Mapping aktiviert werden.

Actions

Erzeuge OTRS Ticket / Create OTRS Ticket
  • Für die Create OTRS Ticket Action können in der Konfigurationsdatei zwei Customfields mit der OTRS Queue und dem Kunden angegeben werden (CUSTOMFIELD_OTRS_QUEUE und CUSTOMFIELD_OTRS_CUSTOMER). Aus diesen werden beim Aufruf der Action die entsprechenden Werte ausgelesen.
  • Die Felder lassen sich über den Eintrag 'CREATE_OTRS_TICKET_ACTION_IS_READONLY' auf nur lesend setzen.
  • Über den Eintrag 'CREATE_OTRS_TICKET_ACTION_IS_ACTIVE' lässt sich die Action komplett deaktivieren.
OTRS Kommentar / OTRS Comment

Keine Konfiguration nötig.

 

  • No labels