Hello everyone.
I am trying to set the issue security for an epic so that epic can be visible to the assignees of the child tasks under the epic.
and whenever the assignee changes for the task the new assignee now can be able to view the parent epic and the pervious assignee unable. How can I achieve this please help me in this.
Hello @Umar Maroof
Are you working with issues in a Company Managed project or a Team Managed project?
If a Company Managed project, then per the Issue Security documentation
A security level's members may consist of:
Individual users
Groups
Project roles
Issue roles such as 'Reporter', 'Project Lead', and 'Current Assignee'
'Anyone' (eg. to allow anonymous access)
A (multi-)user or (multi-)group picker custom field.
There is no option to directly base the security level membership on information in a related issue.
I think you could work around this by
- having a multi-user picker field in the Epic
- using automation rule(s) to add/remove the Assignee of the Epic's child issues to the multi-user picker field of the Epic
- In the Security Level applied to the Epic, add the multi-user picker field.
I work with a Jira Free instance where I can't configure issue security schemes, so I have not had an opportunity to test out the above work around.
@Trudy Claspill yeah exactly I am also thinking about the multiuser field idea for that in automation how pollute the assignees in multifield pickers ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are three posts that talk about modifying a multi-user picker field.
To add a user to such a field you are going to have to use the More Options option in the Edit Action, and add the users using JSON code.
The rule would need to be triggered by a change to the child issue Assignee field (Issue Field Updated trigger)
You would need to create a Branch/Related Issues/Epic (Parent) to "navigate up" to the Epic you want to modify.
Then you would put the Edit Action within that branch. To get the assignee from the child issue that triggered the rule you would need to reference {{triggerIssue...}} as mentioned in the first post I linked above.
The trickier part will be remove the Assignee that was removed from the child issue. To find that person you will have to look at the {{fieldChange}} object immediately after the trigger, and get the original value of the Assignee field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill I try to call assignee of the child but in below jason it call per user so what should I change so I can call the assignees of child?
{
"update": {
"customfield_xxxxx" : [
{
"add": {
"accountId" : "yyyyy"
}
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please show us the rule you have constructed.
And the first post link I provided shows how to reference a field in the child issue, if it was an event in the child issue that triggered the rule.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first post link I provided shows how to reference the Assigned field in the child/trigger issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"update": {
"customfield_10195": [
{
"add": {
"id": "{{childIssue.fields.assignee.accountId}}"
}
}
]
}
}
but it give following error
MDP-325 (Field 'customfield_10195' cannot appear in both 'fields' and 'update')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you shown us everything that is in your Edit action?
Looking at the second to last response on the first post I linked, it seems like the JSON code should look like this:
{
"update":{
"customfield_10195": [{
"add" : { "accountId" : "{{triggerIssue.assignee.accountId}}" }
}]
}
}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is that you have specified the field to set in both the JSON code and in the Choose Fields to Set section above the JSON code.
You can't have the field in both the Choose fields section and in the JSON code.
You need to click on the Choose fields to set pull down and uncheck the copy tasks assignee users in marketing field. In my example I have the Assignee field selected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill thankyou so much its working fine
But what about the other condition if I unassigned the user from the task the user will remove from the field can you help me with that as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
{% if fieldChange.Assignee is not empty %}
"update":{
"customfield_10195": [
{
"remove" : {
"accountId" : "{{fieldChange.Assignee.accountId}}"
}
}
]
}
},
{
"update":{
"customfield_10195": [
{
"add" : {
"accountId" : "{{triggerIssue.assignee.accountId}}"
}
}
]
}
}
{% else %}
{
"update":{
"customfield_10195": [
{
"add" : {
"accountId" : "{{triggerIssue.assignee.accountId}}"
}
}
]
}
}
{% endif %}
}
I am trying this but not working in both cases
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been thinking more about this scenario.
I think adding and removing user individually based on the change of a single child issue is the wrong way to go. Here's why I think this.
Let us say you have Epic ABC-1. It has two child issues; ABC-2 and ABC-3.
ABC-2 and ABC-3 are both assigned to User1. User1 is added to the multi-user picker field in Epic ABC-1.
Then, the Assignee on ABC-3 gets changed from User1 to User2.
User2 appropriately gets added to the multi-user picker field in Epic ABC-1.
User1 is still assigned to another child issue, so you don't really want User1 removed from the multi-user picker field simply because User1 is no longer assigned to ABC-3.
I think the rule needs to be change to not make changes based only on the child issue that triggered the rule. Instead, the rule needs to look at all the child issues as a group, collect the list of all the Assignees on all the child issues, and reset the multi-user picker field on the parent Epic entirely based on the new list of all child issue assignees.
I have not had time to work out the details of how to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thankyou for your help yeah, I am stuck in the 2nd condition I also don't know how I can I achieve that.
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.