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!
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
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.