Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Change issue visibility on transition

Hi,

I wanted to ask if anyone knows of a way we can change the visibility of an issue based on a certain status, i.e issue isn't visible for a wider group until after it's been transitioned to a specific status by the approvals team?

 

Thanks!

2 answers

Hi Mo,

You can create an issue security scheme and have a security level where only the approvals team is part of (use a group or a project role a user/group picker custom field).

You can default that security level for all issues and have a postfunction on the transition(s) to that status to remove the security level.

Once you create an issue security scheme, you can use it via Security Level field.

Regards,

Ioana

We use scriptrunner plugin and some groovy scripts 

on postfunction use (look at screenshot)

----first postfunction

import com.atlassian.jira.component.ComponentAccessor
def cfSelect = ComponentAccessor.customFieldManager.getCustomFieldObject(12508) //Custom field CanBrowseGroup Assign

issue.setCustomFieldValue(cfSelect, null) //disallow browse for all

then if we need add someone to browse 

----second postfunction

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager

def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager)

def ApprovG = ComponentAccessor.getGroupManager().getGroup("Approve-group")
def TransitionPerm = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('CBG Dev')

issue.setCustomFieldValue(TransitionPerm, [ApprovG]) // Сразу топам даем широкие права

def CEO = ComponentAccessor.getGroupManager().getGroup("Group-CEO")
def BuhSup = ComponentAccessor.getGroupManager().getGroup("Group-BuhSupervisor")
def Reception = ComponentAccessor.getGroupManager().getGroup("Group-Reception")
def BuhOpl = ComponentAccessor.getGroupManager().getGroup("Group-BuhTeam-Oplata")
def BuhClose = ComponentAccessor.getGroupManager().getGroup("Group-BuhTeam-ClosingDosc")
def SZPman = ComponentAccessor.getGroupManager().getGroup("Group-SZP-Manager")
def ServiceDir = ComponentAccessor.getGroupManager().getGroup("Group-CSO")
def HReduMan = ComponentAccessor.getGroupManager().getGroup("Group-HRTeam-EduMan")
def HRKaddr = ComponentAccessor.getGroupManager().getGroup("Group-HRTeam-KadrSpec")


def ViewPerm = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('CBG User')


issue.setCustomFieldValue(ViewPerm, [CEO, BuhSup, Reception, BuhOpl, BuhClose, SZPman, ServiceDir]) //Сетим всех кому нужно видеть что запускает ресепшн на оплату


issueLinkManager.getOutwardLinks(issue.getId()).each { linkedIssue ->
String issueType = linkedIssue.destinationObject.issueTypeObject.name
log.info ('Issuetype: '+ issueType)

if (issueType == "Training or Business Travel"){
log.info ('In Linked Training or BT Detected')
issue.setCustomFieldValue(ViewPerm, [CEO, BuhSup, Reception, BuhOpl, BuhClose, SZPman, ServiceDir, HReduMan, HRKaddr]) //Если это командировки и обуч - исключаем ServiceDir и добавляем HR
}
}

Transition_ TBT For Approval - Jira 2021-05-28 16-57-46.png

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

171 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