We have three service desk group, like SD1, SD2 & SD3, and having Developer groups like DEV1, DEV2 & DEV3 and also having another kind of groups for customers like CU1, CU2 & CU3.
In a project, suppose SD1 creates a ticket then only SD1 and DEV1 can see the ticket. If Dev1 escalate the ticket to the CU1 then all service desk groups can able to see the ticket. like..
Could these possible in JIRA?
Many thanks in advance :)
Community moderators have prevented the ability to post new answers.
You could use groovy script runner and add the following script to your workflow as postfunction.
I haven't tested it, but should work. Script is the following:
import com.atlassian.jira.ComponentManager; import com.atlassian.jira.issue.CustomFieldManager; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.jira.issue.IssueManager; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.MutableIssue; import com.atlassian.jira.issue.comments.CommentManager; import com.atlassian.jira.project.Project; import java.util.HashMap; import java.util.Map; // get issue reporter String reporter_usr = issue.getReporterId() ; if ( reporter_usr == 'user_a' ){ issue.setSecurityLevelId(security_level_id) } else { issue.setSecurityLevelId(security_level_id) }
Cheers
Many thanks Kostas :) This is working fine.
Sorry to ask you, my original requirement is that, we have three service desk groups and respective three developer groups and above all three escalated groups.
So, whenever service desk 1 creates the ticket, only it can be view between Service Desk1 and developer group1, if SD2 creates then only SD2 and Dev2 can see the ticket.
If dev1, dev2 or dev3 escalate the ticket then all the sevice desk teams can see the tickets.
So if possible could you please help me to create the script for the above scenario?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Sanu,
your scenario is not something difficult.
First of all create your security level with the appropriate groups:
or any other security level fit your needs.
I'll check it tomorrow morning the api and i'll post the code.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Sanu,
the code for setting the security level according to reporter group is the following
import com.atlassian.jira.ComponentManager; import com.atlassian.jira.security.groups.GroupManager; import com.atlassian.jira.issue.IssueManager; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.MutableIssue; GroupManager groupManager = ComponentManager.getComponentInstanceOfType(GroupManager.class) //String reporter_usr = issue.getReporterId() ; if ( groupManager.isUserInGroup(issue.getReporterId(), "group_ name_1")) { issue.setSecurityLevelId(security_level_id_1) } else if ( groupManager.isUserInGroup(issue.getReporterId(), "group_ name_2")) { issue.setSecurityLevelId(security_level_id_2) } else if ( groupManager.isUserInGroup(issue.getReporterId(), "group_ name_3")) { issue.setSecurityLevelId(security_level_id_3) }
Test it first because i haven't.
For the escalation there are different approaches. If you use a field that indicates the escalation i think you should use a listener that catches the field value change and sets the appopriate security level.
If you use a workflow transition for escalating you have to create a script that sets the issue security level to the appropriate value.
Maybe there are more options to change issue security level when escalating issue.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks Kostas :) It's working fine :)
It's awesome!! I'm planning to create two scripts (for two kind of escalations) and adding into workflow post-functions. I guess this approach will be easier one.
Cheers :) :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanu,
Just to add on, I managed to find this Improvement Request for the ability to configure issue security based on Group here : JRA-5276.
I would recommend that you do the following on the feature request ticket :
* Vote, so that it will receive more attention
* Watch it, so that you will receive any and all updates
* Comment, and give your opinion on the matter
Please note that the implementation of new features and improvement requests falls under Atlassian's Implementation of New Features Policy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do it like this:
Create issue levels security :
LEV1 which contain two groups (SD1, DEV1)
LEV12 which contain two groups (SD1, DEV1,CU1)
When issue created , make level security LEV1 and when the issue escalated make level security LEV12
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But how I can automatically set the security level based on the reporter of the issue. Means, if SD1 creates then SD1 & DEV1 has the view permission and if SD2 creates then SD2 and DEV2 havinng the perssion??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can use JavaScript and REST-API, if there is screen or
use JJUPIN in the post function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will have to develop certain workflow post functions which sets the security level based on who creates/escalates the issue. The post functions should implement the rules you mentioned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. You'll just have to configure them properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's all configuration:
https://confluence.atlassian.com/display/JIRA/Configuring+Issue-level+Security
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as my knowledge, I think above scenario is not possilbe with JIRA default issue security configuration. Because default one will not give issue security based on assignee or status of the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.