Configure HTTP Feed Custom Fields - AndreyVMarkelov/andreymarkelov-atlas-plugins-requestedfields GitHub Wiki

This plugin contains fields which obtain values from HTTP request in XML or JSON formats. Searchers are available for all custom fields.

Features:

  • JSON Request Custom Field - is the select field which obtains values from JSON response via JSONPath (http://goessner.net/articles/JsonPath/). If default value is set then this value will be added to list values;
  • XML Request Custom Field - is the select field which obtains values from XML response via XPath. If default value is set then this value will be added to list values;
  • JSON Multi Request Custom Field - is the multi select field which obtains values from JSON response via JSONPath (http://goessner.net/articles/JsonPath/). If default value is set then this value will be added to list values;
  • XML Multi Request Custom Field - is the multi select field which obtains values from XML response via XPath. If default value is set then this value will be added to list values.

Installation and upgrade:

Open JIRA's plugin manager, and in the Find new add-ons section search for HTTP Feed Custom Fields and click Install. Alternatively, you can start from the Atlassian Marketplace page of HTTP Feed Custom Fields.

Steps to configure:

I will configure only XML Request Custom Field because configuring other fields is similar.

1. Create new XML Request Custom Field.

For JIRA versions before 6.1 in Administration, select Custom Fields and click Add Custom Field. Select XML Request Custom Field (see, Pic 1) and click Next.

Pic 1

For JIRA versions after 6.1 in Administration in section Issues, select Custom Fields and click Add Custom Field. Select XML Request Custom Field (see, Pic 2) and click Next.

Pic 2

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

Pic 3

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

2. Configure value provider and default value.

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

Pic 4

On the opened screen, click find and click Edit XML|JSON Http Settings (see, Pic 5).

Pic 5

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

  • URL - the URL to required resource. For GET request may contain GET parameters;
  • Basic Auth Username - username for basic access authentication if required;
  • Basic Auth Password - password for basic access authentication if required;
  • Request Type - HTTP request type (GET, POST);
  • Request Data - body of HTTP Post request;
  • XPath or JSON Path - path for getting values.

When required fields are configured, click Done (see, Pic 6).

Pic 6

Now again on Configure Custom Field page you can specify default value for the field, just click to Edit Default Value (see, Pic 7).

Pic 7

3. Working with the fields.

On create and edit screens a XML Request Custom Field looks like in the following picture (see, Pic 8).

Pic 8

On a view screen a XML Request Custom Field looks like in the following picture (see, Pic 9).

Pic 9

4. Sample of settings for testing

URL - http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true;

Request Type - GET;

XPath - //GeocodeResponse/result/address_component/long_name/text().

⚠️ **GitHub.com Fallback** ⚠️