Versions Compared

Key

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

Use this tutorial for guidance on updating access permissions for viewing/editing fields across various statuses within the workflow.

Example.

In the 'NewBacklog' status, both Peter and Rickard can view and edit. However, in the 'Waiting for ApprovalIn Progress' status, only Rickard can edit, while both Peter and Rickard can view the information.

...

Show an example how the PF Viewers is configured to have the Automation for Jira as user.

For debug or clarity you may want to add a group or reporter, creator and assignee to the View Permission of the PF Editors and PF Viewers field to see who can view edit.

Add API

  1. Navigate to Manage Apps

  2. Click on Protected Fields

  3. Click on API tab

  4. Create an API token

...

Now we want to create an automation that sets Peter to the PF Viewer and PF Editors on Create.

  1. Create a new Automation rule

  2. Add When: Issue Created

  3. Add Send web request, copy the URL from the API step above, include ?toke=token&issueKey={{issue.key}} in the URL.

  4. Add the Body, as below but change the field ids to your custom fields.

    Code Block
    languagejs
    [   
       {
          "fieldId":"customfield_10203",
          "value": ["{{reporter}}"]
        }, 
        {
          "fieldId":"customfield_10204",
          "value": ["{{reporter}}", "{{assignee}}"]
        }
    ]

...

Testing this will result in an issue with a secured Salary that on the first state lets Peter edit the field.

Image Added

Now create a second automation that removes Peter from the PF Editors field, since its only automation user that can do this, we have secured it to the automation engine.

  1. Create a new Automation rule

  2. Add When: Issue Transitioned, enter the status Backlog to In Progress

  3. Add Send web request, copy the URL from the API step above, include ?toke=token&issueKey={{issue.key}} in the URL.

  4. Add the Body, as below but change the field ids to your custom fields.

...

Code Block
languagejs
[   
    {
      "fieldId":"customfield_10204",
      "value": ["{{assignee}}"]
    }
]

...

This will result in removing Peter from the PF Editors field and only keep Rickard.

Now when Peter tried to edit the field he will not be able.