Skip to content

Configure Copy To Clipboard

Andrey Markelov edited this page Apr 19, 2020 · 13 revisions

This plug-in contains field which is rendered as button. When user clicks the button issue data copying to clipboard by some defined template.

Features:

  • Copy To Clipboard is custom field which is rendered as button. When user clicks the button issue data copying to clipboard by some defined template into custom field configuration.

Installation and upgrade:

Open JIRA's plug-in manager, and in the Find new add-ons section search for Copy To Clipboard and click Install. Alternatively, you can start from the Atlassian Marketplace page of Copy To Clipboard.

Steps to configure:

1. Create new Copy To Clipboard.

In Administration in section Issues, select Custom Fields and click Add Custom Field. Select Copy To Clipboard (see, Pic 1) and click Next.

Pic 1

On details page, provide list name and description. Also, please, make sure that searcher is set. Defaults are Any issue type and Global context. Click Finish.

On the next screen, associate list with one or all screens. Click Update.

2. Configure template.

On the Custom Fields page, scroll down to your new custom field. On the right, click the drop-down and select Configure.

On the opened screen, click find and click Edit Copy Pattern (see, Pic 2).

Pic 2

On the next screen, specify field settings. The settings are:

  • Copy Pattern - the velocity template with variables:
  1. $issue Issue Java Object
  2. $customFieldManager CustomFieldManager class See, Pic 3.
Pic 3

3. Working with the fields.

On view screen a Copy To Clipboard looks like in the following picture (see, Pic 4).

Pic 4

On a list view screen a Copy To Clipboard looks like in the following picture (see, Pic 5).

Pic 5

4. Pattern examples:

  • Base pattern for commit:

    $issue.key: $issue.summary
    
  • Copy with custom field value:

    #set($field = $customFieldManager.getCustomFieldObject("customfield_10002"))
    #set($fieldval = $issue.getCustomFieldValue($field))
    $issue.key: $issue.summary (Field Value: $fieldval)
    
  • Copy link

    $baseUrl/browse/$issue.key
    
Clone this wiki locally