Automation + Protected Fields

How to set Protected Field via Automation.

To do this you must use an Unencrypted field, this because there is no encryption method in automation that can be used at the moment.

Edit Issue

In automation select edit issue action and use the following syntax

{ "fields": { "customfield_10138": "Hello World!" } }

Example above sets a Protected Text Field Unencrypted to Hello World!

 

{ "fields": { "customfield_10138": {{#=}}{{issue.Quantity}}*{{issue.Unit Amount}}{{/}} } }

Example above sets a Protected Number Field Unencrypted to the Quantity times Unit Amount field values.

Copy Protected Field Date to Due date on change

This example is used when due date should be in sync with a Protected Field, to ensure consistency remove the due date field from the edit/create screen.

Add an automation rule that triggers on Field change and select the Protected Date Field as the trigger field and the Edit Issue as For event. This will make automation to trigger whenever a Protected Field Date is updated.

Add an Edit issue action and select Due date as field, in the value box enter the syntax below.

{{issue.Unencrypted Date Field.date}}

Note that your field name will differ from Unencrypted Date Field and .data need to be in the end of the field name.

 

Set a default date on a Protected Field - Unencrypted Date type

This example takes the current date and set that as the date on a Protected Field unencrypted date type.

Create an automation and choose Issue Created as trigger

Add an Edit Issue action with the following body. Be sure to replace the customfield_10140 with your field ID.

 

Automation + Protected Fields API adding value to PF

  1. Add a automation rule

  2. Select trigger, like Created, Updated or Commented

  3. Add a condition when to run the automation

  4. Add a Webhook action

  5. Set Method to POST and URL to the URL found in Protected Fields api admin page.
    Generate an API token and add the token to the URL such as pfURL?token=yourtoken&issueKey={{key}}

  6. Add the Body

Copy PF Multiuser Encrypted to Jira User Picker

  1. Add a automation rule

  2. Select trigger, like Created, Updated or Commented

  3. Add a condition when to run the automation

  4. Add a Webhook action

  5. Set Method to GET and URL to the URL found in Protected Fields api admin page.
    Generate an API token and add the token to the URL such as pfURL?token=yourtoken&issueKey={{key}}&fieldId=customfield_xyz
    customfield_xyz is the PF Multi-user field

  6. Check the delay execution until response checkbox

  7. You can test this by adding an issue key that has the field on it

  8. Add a Edit Issue action

  9. Enter the following body. Change the Approvers field to the field you want to add the users to

  10. Click Save and publish

This will now fetch the field value from the API and put it into a multi-user field.

Add PF Multiuser Uncrypted to Jira User Picker

  1. Add a automation rule

  2. Select trigger, like Created, Updated or Commented

  3. Add a condition when to run the automation

  4. Add a Edit Issue action

  5. Enter the following body. Change the Approvers field to the field you want to add the users to and the Unenc multi user to the PF unecrypted user picker

  6. Click Save and publish