Versions Compared

Key

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

This article explains how to set the scope of a filter in Jira to either Global or Private using Jira Command Line Interface (CLI).

Instructions

The setShareScope action in Jira

...

CLI, allows the filters to be available

...

either globally or privately with Global

...

and Private settings respectively.

  1. Before creating a filter in Jira, set the scope of the filter using the action setShareScope as given in the example below example.:

    Code Block
    themeMidnight
    --action setShareScope --value Global

    The above action will default This action defaults the filter share scope for the current user to GLOBALGlobal.

  2. Now, create Create a filter using the createFilter action as given in the example below example.:

    Code Block
    themeMidnight
    --action createFilter --name filterforTSboard --jql "project = TESTER01 ORDER BY Rank ASC"

    The above This action creates a filter named "filterforTSboard" for the Jira project "TESTER01".

  3. To verify Verify the filter permissions from Jira UI , log in to with the instructions below:
    1. Log into Jira as an administrator. 
    2. From the top navigation bar,
    click on Issues, from
    1. click Issues.
    2. From the dropdown select
    manage filters
    1. the Manage filters option, as shown in the screenshot below
    .
    1. :
    Image Removed
    1. Image Added
      As the screenshot below
    screenshot
    1. indicates, the filter "filterforTSboard" has no restrictions and can be viewed by any logged-in user.
    Image Removed
    1. Image Added
  4. Similarly, the filters can be restricted by setting the scope to "PRIVATE" Private. Refer to the sample action given below for the same.:

    Code Block
    themeMidnight
    --action setShareScope --value private


    Code Block
    themeMidnight
    --action createFilter --name filterforTSboard-1 --jql "project = TESTER01 ORDER BY Rank ASC"


  5. The filter "filterforTSboard-1" will be is set as private Private in Jira as shown in the below screenshot.
    Image Removedscreenshot below:
    Image Added
Info

Please note that the scope of the filter can only be applied during filter creation but not while updating. Hence setShareScope doesn't set the filter scope when performing updateFilter CLI action.


Info

It is recommended to test this scenario in a non-production environment, or , run the action with the --simulate parameter to verify the behavior before deploying.

...