Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Note

You need a JIRA server account to set this up

...

Note

You need to add a field of type workflowField (issue link control) to all categories which should show a list or referenced tickets. Actually ask our support to do this...

You need to add a field of type workflow to all categories which should have one to one mapping between Matrix and JIRA. Actually ask our support to do this...

 


You can setup the JIRA server plugin using the admin client. You will need the following information which is stored on the server

  • server type: if you use "JIRA server" select it otherwise "JIRA Cloud with Medical add-on" is the correct selection.
  • the url of your JIRA server instance, e.g. 'https://jira.mycompany.com',
  • the rest service of your JIRA server instance, e.g. 'https://jira.mycompany.com/rest/api/2'
  • a user which has access to JIRA,
  • the password of the user

 

The client configuration can be done by an optional JSON object. Please note the text must use double quotes (") around all strings. The following parameters can be set:

 
  • enabled: true | false - can be be set to false to disable the integration
  • defaultProjectId:string - this is the default project in the create issue dialog
  • defaultTypeId:string - this is default issue type in the create issue dialog

  • requireCommitTicket: true | false - set to true if a JIRA ticket ID must be part of the change comment

  • addJIRAComment: true | false - set to true if the change comment should also be saved in JIRA

  • projectsAndTypes: an array of projects which should be available. If set only projects listed in here are available. Each of them needs

    • id:string the (short) JIRA project key
    • name:string a name for humans the project (used in the Matrix client only)
    • issueTypes:[] an array of issue types (tasks or bugs in JIRA). Only types listed in here can be created. Each of them needs
      • id:string the JIRA id of the type (e.g. BUG, TASK, EPIC, ...)
      • name:string a name (used in the Matrix client only)
  • one2one:{} a structure which can be set if there should be a one to one mapping between an Matrix item and JIRA bug/task. It has two values:
    • projectId:string the project id
    • typeId:string the type id
  • states:[]: an array mapping JIRA states to Matrix states. This can be configured per project and type, depending on the JIRA workflow 
    • projectId:string the project id can be empty for the default if there is no specific mapping)
    • typeId:string the type name (can be empty for the default if there is no specific mapping)
    • states:[] a list of mappings for this project / type
      • name:string the name of the status in matrix, this is computed automatically 
      • color:string color in display (one to one mapping)
      • background:string background color  (one to one mapping)
      • done:true | false if set to "true" the ticket will be rendered with strike through 

  •  

    { "enabled":true, "jiraBaseUrl":"https://matrixtest.atlassian.net", "pluginId":"101", "defaultProjectId":"DEMOX", "defaultTypeId":"IMPROVE", "projectsAndTypes": [ { "name":"Demonstration Project", "id":"DEMOX", "issueTypes":[ { "id":"BUG", "name":"Bug"}, { "id":"TASK", "name":"Task"}, { "id":"IMPROVE", "name":"Improvement"}, { "id":"EPIC", "name":"Epic"}, { "id":"STORY", "name":"Story"} ] },
    Code Block
    languagejs
    titleExample
    collapsetrue
    Code Block
    
    interface ITaskConfiguration {
        defaultSearches?:ITaskSearch[] // can be used to define default search expressions, (e.g. shortcuts to search task changed in last x hours, server plugin must understand these...)
        one2OneMapping?:IOne2OneMapping // requires one2one capability. defines how external items are shown
        // the first search in the list will be executed automatically when the dialog is opened
        // in order not to run an automatic search define first element in array with name="" 
        allowEmptySearches?:boolean // can be set to true if plugin can handle it 
        searchHelp?:string // can be an url to any website to explain search options (e.g. jql https://..atlassian.. /jql)
        autoSearch?:boolean // can be set to true to start default search (when opening dialog)
        smartLinks?:ISmartTask[] // a set of rules to automatically show hyperlinks to items -> note these are available only in the client, in documents the same rules will not be applied!
        smartUrls?:ISmartUrls[] // a set of rules to automatically detect dropped links
        projectsCreate: ITaksProjects[] // there must be at least one default project in which tasks can be created
        projectFilter: string[] // filter for projects of which items are displayed in workflow control, if not set all tasks are shown -> problem this also needs to be implemented in reports
    
        useAsDescription?:ITaskTaskDescription // defines if and what to use as default description -> default is empty (an empty description box)
        useEmptyTitle?:boolean // by default the title of new task is the current item title, true leaves it empty
        requireCommitTicket?:boolean // set to true if saving should requires a task id (requires smartLinks to be configured)
        // these can be overwritten by client settings
        pluginName:string  // e.g. JIRA, GitHub, ...
        pluginLongName:string  // e.g. JIRA Server Plugin, GitHub Plugin, ...
        // these can be used to overwrite the plugins's default (if the plugins says they are possible)
        hideCreateTask?:boolean // overwrites canCreate capability
        hideSearchTasks?:boolean // overwrites canFind capability
        //createBacklinks?:boolean // if set to false overwrites the option to canCreateBacklinks capability
        handleAsLink?:boolean // should not be changed - if true links are treated like URLs
        hasMeta?:boolean // should not be changed - if true external items have a descirption and a status
        // server computed settings they can also be overwritten
        nativeCreateUrl?:string // overwrites nativeCreateUrl
        nativeCreateSearch?:string // overwrites nativeCreateSearch
        pluginId?:number 
    };
    
    type ITaskTaskDescription = "hide"|"empty"|"text"; // later we could support html editors - not now though |"html"
    
    interface IOne2OneMapping {
        // configures 1-1 mapping
        projectId:string // id communicated to server to indicate in which project to create tickets
        taskTypeId:string // id communicated to server to indicate what type 
        showId?:boolean // shows external item's id in title
        statusOverwrites:IOne2OneMappingStatus[]
    }
    interface IOne2OneMappingStatus extends ITaskRenderInfo {
        externalStatusName:string // name of external status
        text:string // text to show
    }
    
    interface ITaskRenderInfo {
        text:string, // one to one mapping will show this text
        color:string, // in this color
        background:string, // with bg color
        strikethrough?:boolean // optional strikethrough 
    }
    
    interface ITaskSearch {
        name:string // name of search to show in UI
        expression:string // expression to be send to server
    }
    interface ITaksProjects {
        projectId:string // id communicated to server (can be "" if there is no concept of a project in server plugin)
        projectName:string // name communicated to user 
        taskTypes: ITaskType[] // there must be at least one default task type per project
    }
    
    interface ITaskType {
        taskTypeId:string // id communicated to server (can be "" if there is no concept of a different task types in server plugin)
        taskTypeName:string // name communicated to user 
        iconUrl?:string // can be an url of an icon to display
        iconClass?:string // can be an class of an icon to display
    }
    
    interface ISmartTask {
        regex:string // regex which needs to match, e.g. (github)(-)([0-9]*) would match "github-12" with three groups, "github", "-" and "12" as $0,$1 and $2
        issueProjectId:string  // a template which creates the project information for a matched issue (uses the same replacement as above), eg. $0 for github
        issueId:string  // a template which creates the issue information for a matched issue (uses the same replacement as above) e.g. $2 for 12
        title:string  // url template for a title (can be empty)
        url?:string  // url template which needs to be created for the hyperlink, e.g. "https://myissue.com/myticket/ticke-$2/details" would replace the $2 with the second  group (like "12" above)
    }
    interface ISmartUrls {
        regex:string // regex which needs to match, e.g. (github-)([0-9]*) would match "github-12" with two groups, "github-" and 12
        issueProjectId:string  // a template which creates the project information for a matched issue (uses the same replacement as above)
        issueId:string  // a template which creates the issue information for a matched issue (uses the same replacement as above)
        title:string  // url template for a title (can be empty)
        priority?:number // if there are several matches the highest priority will win
    }
    


    Code Block
    languagejs
    titleExample
    collapsetrue
    {
      "projectsCreate": [
        {
          "nameprojectId": "ORMATRIX",
          "idprojectName": "ISMATRIX",
          "issueTypestaskTypes": [
            { "idtaskTypeId": "TASKBug",    "nametaskTypeName": "TaskBug" },
          ]     }],
      "one2one{ "taskTypeId":{ "New Feature",   "projectIdtaskTypeName": "DEMOX",New Feature" }
        "typeId":"TASK"  ]
    },   "states": [ },
        {
          "projectprojectId": "MATRIX",
          "ticketTypeprojectName": "MATRIX",
          "statestaskTypes": [
            { "nametaskTypeId": "openTask",          "color"taskTypeName": "whiteTask", "backgroundiconUrl": "red",    "doneiconClass": "false" }
          ]
        }
      ],
      "smartLinks": [
        { "nameregex": "in progress(MATRIX)(-)([0-9]+)",   "colorissueProjectId": "black$1", "backgroundissueId": "yellow$1$2$3", "donetitle": "false"title not yet synced", "url": "https://matrixreq.atlassian.net/browse/$0" }
      }],
      "smartUrls": [
        { "nameregex": "Done(MATRIX)(-)([0-9]+)", "issueProjectId":         "color"$1", "issueId": "white$0", "backgroundtitle": "greenissue",  "donepriority": "true"0 }
      ],
       }
     "autoSearch": true,
      "defaultSearches": [
        ]{ "name": "last", "expression": "jql:updated<1w" }
      ]
    }