Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to make a issue status not visible to users

2019-04-23 09_10_07-Update Workflow Function Parameters - Internet Explorer.png



    a colleague asked me to create a workflow in which there is an initial status which should be visible only to her, not to the other users defined in the project workflow.

So I searched for a solution and I finally read some KBs speaking about post functions script working with security permissions.

We have script runner as plugin, so I defined a post function after the initial "issue create" as suggested in one post (you can see the code in the attachment), in order to make the initial state only visible to users belonging to a Group ("analisti" is the name of the Group), but this is not working as expected.

Infact a user which should not be able to see the issues created, is instead able to see them.

Where am I wrong?

Have you any suggestions to share with me?

Thanks in advance.

Best regards


1 answer

1 accepted

0 votes
Answer accepted
Antoine Berry Community Leader Apr 23, 2019

Hi @Marco Barbaro ,

Once you have linked the issue security scheme to the project, you can indeed use the following scritrunner postfunction : 



with this condition code : 

import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(issue.reporter?.name, 'analisti')

and select the appropriate issue security level. In the following transition you will have to set the security level to "all users" so they can see the issue again.


Hi Antoine,

   perhaps I have mistaken something because I already did what you suggested but it is not working.

I have modified post function of "Create Issue" as suggested with your code, setting a issue security scheme where the users granted are the ones belonging to "analisti".

User "zanni" is not in "analisti" group but if I create an issue with another user belonging to "analisti", "zanni" is able to see the issue and comment it.

"zanni" is the project lead, so I modified project settings in order to make the "default assignee" unassigned, but this didn't modify the behaviour I'm describing.


What do you think about it?

We'd like to introduce "zanni" to the issue only after a status change, from the initial one I'm talking about to the next in the workflow...


Thanks again


Antoine Berry Community Leader Apr 23, 2019

In fact this has been confusing for myself as well. If I understood correctly when the issue is in the first status only users in "analisti" should be able to see the issue right ? In that case define the security level as follows (replace BAL with analisti)

image.pngThen use this post function : 

image.pngOnly users in the group "BAL" will be able to view the issue : 



Like Marco Barbaro likes this

Hi Antoine,

   you have understood my problem, thanks, but still got no working solution.

I'll attach a few screenshot.

I defined a issue security scheme as suggested, then modified "Create Issue" post function as your in screen, but "zanni" is still able to see new issues.

Please note that "analisti" group does not contain "zanni".

Where am I wrong?2019-04-23 11_30_06-Edit Issue Security Levels - Gruppo PAM JIRA.png2019-04-23 11_31_09-Update Workflow Function Parameters.png

Antoine Berry Community Leader Apr 23, 2019

Could you also attach screenshots of the security level configuration (Utenti Disi one), and confirm that the security level is correctly set on the issue after creation, just as on my previous screenshots ?



cannot find in the issues the "security field".

Perhaps this is the missing point, isn't it?

Where do I enable it?

Thanks again


Antoine Berry Community Leader Apr 23, 2019

Make sure the issue security scheme is linked to your project : 

image.pngIf this is not the case, go to the project configuration and click issues : 


Then you should be able to see the security level on the issue.


Like Marco Barbaro likes this

Hi Antoine,

   yes! This seems to do the trick I was missing.

So, I defined two security levels: one only for "analisti" group and a second for "anyone".

I added a post function pointing to the second security level to the transition which goes outside from the initial state.

This way the user "zanni" didn't see the issue after its creation :)

I'll do some other tests, but I think it works now.

Thanks again Antoine!!


Like Antoine Berry likes this
Antoine Berry Community Leader Apr 23, 2019

Exactly, you have figured it out, glad to help. :)

Please consider accepting the answer if you are satisfied with it.

Like Marco Barbaro likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across Jira Cloud instance.   📢 Get y...

137 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you