diff --git a/oslcjira/doc/user_doc.md b/oslcjira/doc/user_doc.md new file mode 100644 index 0000000..dadb737 --- /dev/null +++ b/oslcjira/doc/user_doc.md @@ -0,0 +1,740 @@ +User documentation +================== +This document describes how to use and set JIRA OSLC plugin. + +General +------- +JIRA OSLC Provider plugin is Atlassian JIRA add-on. Main role of this plugin is extend JIRA issue +functionality to provide establishing and removing OSLC links between JIRA issue and external OSLC object. +Plugin enables handling OSLC links in N to M mode, one issue can have the links to M OSLC objects and N OSLC +objects can be linked to one JIRA issue. + +Plugin doesn't duplicate OSLC links. It is not possible to create two same links from one specific JIRA +issue to one specific external OSLC system object. + +Plugin is making use of two ways of authorization of external OSLC system, OAuth authorization +and simple credential authorization. + +### OSLC URL strategy +Plugin provides several REST resources for communication with external system based on OSLC specification. This chapter states all relevant URLs to these resources. +URL has common "prefix" based on server, where JIRA instance is running. + +#### Root services +Http GET only: + + /rest/jirarestresource/1.0/rootservices + +#### OAuth +Getting consumer key - http POST: + + /rest/jirarestresource/1.0/oauth/requestKey + +Getting request token - http POST: + + /rest/jirarestresource/1.0/oauth/requestToken + +User authorization - http GET: + + /rest/jirarestresource/1.0/oauth/authorize + +Getting access token - http POST: + + /rest/jirarestresource/1.0/oauth/accessToken + +#### Service providers catalog +Http GET only: + + /rest/jirarestresource/1.0/catalog/singleton + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Service provider(s) +Http GET only: + + /rest/jirarestresource/1.0/serviceProviders/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Issue types + +List of types - http GET: + + /rest/jirarestresource/1.0/issueTypes + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Name of particular type - http GET: + + /rest/jirarestresource/1.0/issueTypes/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Issue priorities + +List of priorities - http GET: + + /rest/jirarestresource/1.0/issuePriorities + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Name of particular priority - http GET: + + /rest/jirarestresource/1.0/issuePriorities/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Issue states (workflow) + +List of states for particular issue - http GET: + + /rest/jirarestresource/1.0/issueStates/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Name of particular state - http GET: + + /rest/jirarestresource/1.0/issueStates// + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Issue resolutions + +List of resolution - http GET: + + /rest/jirarestresource/1.0/issueResolutions + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Name of particular resolution - http GET: + + /rest/jirarestresource/1.0/issueResolutions/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +#### Issues (change requests) +List of issue for particular project - http GET: + + /rest/jirarestresource/1.0//changeRequests + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Partucular issue - http GET: + + /rest/jirarestresource/1.0//changeRequests/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + +Create new issue - http POST: + + /rest/jirarestresource/1.0//changeRequests + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + * Content-Type = application/rdf+xml + +Update issue - http PUT: + + /rest/jirarestresource/1.0//changeRequests/ + +Headers: + * OSLC-Core-Version = 2.0 + * Accept = application/rdf+xml + * Content-Type = application/rdf+xml + +Installation & Configuration +---------------------------- +### Installation of JIRA OSLC Provider plugin + +For installation JIRA plugin do following steps: + 1. Download JIRA OSLC Provider plugin installation "jar" file. + 2. Log in to JIRA as administrator. + 3. Open JIRA Administration - "Add-ons" -> "Manage add-ons" section. + 4. Upload add-on. + 5. Select JIRA OSLC Provider plugin installation jar file and select "Upload". + 6. Check proper installation in "User-installed add-ons" list. + +### JIRA Admin settings +There is needed to create the custom fields for proper working of JIRA OSLC Provider plugin. + - External Links - handles the links to the external systems + - Snapshot - handles a snapshot of the external object + - Error log - handles information about synchronization. It's divided to two sections - for inbound and outbound connection + +#### Add new "External Links" JIRA custom field named "External Links" +New "External links" JIRA custom field type is provided by JIRA OSLC Provider plugin. Correct name of new custom field +is important for association the links with this specific custom field. + + 1. Log in to JIRA as administrator. + 2. Open JIRA Administration - Issues - Custom Fields. + 3. Add Custom Field. + 4. Select External Links field type and name new custom field as "External Links" (mandatory!). + 5. Associate new custom field with "Default Screen". There is no need to associate new custom field with other issue screens. + +#### Add JIRA custom field for handling the snapshot of external object +The field contains the snapshot of external object. The list of fields which are contained in the snapshot is defined +in the LeanSync configuration. + + 1. Log in to JIRA as administrator. + 2. Open JIRA Administration - Issues - Custom Fields. + 3. Add Custom Field. + 4. Select multi-line field type and name new custom field as "Snapshot". The name is of your choice and it has to be defined + in the LeanSync configuration + 5. Associate new custom field with "Default Screen". There is no need to associate new custom field with other issue screens. + +#### Add JIRA custom field for handling the error log +It contains the information about synchronization with external system. It's divided to two sections - for inbound +and outbound connection. The information are displayed only when LeanSync configuration is set up correctly. + + 1. Log in to JIRA as administrator. + 2. Open JIRA Administration - Issues - Custom Fields. + 3. Add Custom Field. + 4. Select multi-line field type and name new custom field as "Error log". The name is of your choice and it has to be defined + in the LeanSync configuration + 5. Associate new custom field with "Default Screen". There is no need to associate new custom field with other issue screens. + +### OAuth admin settings +JIRA OSLC Provider authorization functionality is based on OAuth v 1.0 open protocol. + +Following OAuth authorization steps need to be done for establishing proper connection between JIRA OSLC Provider plugin +and external OSLC system. For all steps the admin user rights is needed. + +All settings described in this chapter are placed in JIRA - Administration - "Add-ons" - OSLC section. + +Note: "OSLC" section is a part of plugin and will be accessible after plugin installation. + +#### OAuth consumers administration +Admin JIRA user can register OAuth consumer in "Register consumer" section. + +In this section user set the external OSLC system consumer name, consumer key and consumer secret. By this operation +JIRA OSLC Provider plugin registers this specific consumer key directly to "Authorized keys" list. + +Another way how to register the consumer key is requesting provisional OAuth key by external OSLC system from JIRA. +External system requests registration, provisional key is produced by JIRA and sent to external server. After accepting +of provisional key by JIRA admin user the authorized key is produced and registered directly to "Authorized keys" list. + +#### Root services management +If the external system is providing Root service interface, JIRA OSLC Provider plugin can fetch information about services provided from external system: + * URL to get consumer key + * URL for service provider catalog + * URLs for OAuth. + +There is needed to fetch service providers from external server. For this reason JIRA OSLC Provider plugin is providing +the "Server friends" list. + +#### Service provider catalogs management +Some OSLC servers don't provide root service interface. In that case information about service providers can be fetched +directly by service provider catalog interface. JIRA OSLC Provider plugin offers possibility of set such service provider +catalog and afterwards save obtained service provider catalog list. + + 1. Log in to JIRA as administrator + 2. Open JIRA Administration - "Add-ons" - Service provider catalogs + 3. Fill in all mandatory fields. + * Title - Your name of saved catalog + * Service provider catalog URI - URI to external system service provider catalog + * OAuth consumer key - OAuth consumer key provided by external system + * OAuth consumer secret - OAuth consumer secret provided by external system + * OAuth domain - OAuth domain of external system + * OAuth request token URI - OAuth request token URI of external system + * OAuth user authorization URI - OAuth user authorization URI of external system + * OAuth access token URI - OAuth access token URI of external system + 4. Click on Request Access button. JIRA OSLC Provider plugin will save external system catalog to the "Service provider + catalog" list. + +#### Project relationships +External OSLC systems can define and provide own service providers. + +JIRA OSLC Provider plugin enables selection and save service providers to service providers list in project management +section. List can contain various service providers from various OSLC external systems. + +Selecting and saving service providers: + 1. Log into JIRA as administrator. + 2. Open JIRA Administration - "Add-ons" - Project relationships. + 3. Select one of already registered external OSLC servers. + 4. In Service providers select some providers with which JIRA OSLC Provider plugin will be working. + 5. Click to "Add" button. JIRA OSLC Provider plugin will add providers to its list. + +Selecting and saving service providers in other OSLC system then JIRA: +As OSLC external systems are providing service providers also JIRA OSLC Provider plugin is providing own service providers. + +Note: In plugin terminology, Service provider means JIRA project i.e. each project existing in JIRA instance represents +one service provider provided by plugin. + +### LeanSync configuration +The configuration is handled in the xml file which is stored in Administration -> Add-ons -> LeanSync configuration. +The configuration is defined for projects and issue types. It's possible to have one or more configurations for different +projects. It's described in more detail in the following chapters. + +The basic structure of configuration looks like that: + + + + + + + + + + + + + ..... + + + + + + ..... + + +