Hello Team,
We have created Two User picker custom fields and added agents in it. Where Custom Field 1 has values A, B, C and Custom Field 2 has values A, B, C, D, E, F. Since A, B, C are the common values those values need to be copied into a new user picker custom field. How can we achieve this requirement,
Any quick suggestions will be more helpful.
Thanks,
Hello @Jakeer
I just tested and it worked for me so I am not sure whats wrong with your set up.
Only thing I notice is that in your edit issue section, you are unncessarily choosing a field..
Nothing should be selected in the "Choose fields to set".. Only the advanced section should be set.
It should be like below screenshot.. notice I have no fields selected.. you have choosen "JSMField" in that dropdown.. we dont need to do that..
Hello @Jakeer
Are you asking how to do this using Automation or using script execution? Not clear from your post/..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
Sorry for not explaining in detail.
We need this through Automation rule.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jakeer
What will be your trigger? Manual or Field Change? Or something else.
Lets assume its either Manual or Field change. (otherwise it gets complicated)
You do Advanced Branching after trigger to compare 2 fields and if value exists, update the third.
Lets assume your 3 fields are customfield_1000 , customfield_1001, customfield_1002.
where
Steps:
{
"update": {
customfield_1003" : [
{
"add": {
"id":"{{myagent}}"
}
}
]
}
}
I havent tested this because I dont have this many fields, please see screenshot, implement and share your rule and audit log section to review.
Your Edit issue should use advanced Edit like below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good Morning!
Thanks for your help.
I have tried the automation rule you sent and the rule is not working as expected.
I have created an automation rule where is copied the Assignee Group Values into "User in groups" Custom field and Organization values into "User in Organizations" custom field.
Such that the values in User in Groups= Jakeer and Malisha if Assignee Group = L1 helpdesk
Values in User in Organizations = Malisha if Organization = HSBC
The common values present in the two custom fields are getting copied with the automation you provided. If both the members are in both the custom fields User in Groups and User in organizations then the values are not getting copied only one value either Jakeer or Malisha name is getting copied in the new field "myagents"
With the Automation rule you described I have tried and when i change the values the names are not getting changed although they are not part of assignee group or Grouporganization their names are remained same without changes in the field.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have shared the screenshot where i am not part of Organization still my name sowing after changing the values.
Also If Jakeer and Malisha both are part of both the fields then both the names are not getting copied in the customfields-3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the above screenshot both the values are present in both the custom fields still only one value copied in the customfield-3 which is myagents field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jakeer
You need to share with me the detailed screenshots of the rule you have written including audit logs. Unless you share those, I cannot tell anything.
Again, I need screenshots of your advanced branch, your if condition, your edit issue and audit log of the run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
Sorry for the late response.
Please find the attached screenshots of the automation rule.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using the above automation rule to separate the agents who belongs to User in Groups as well as User in Organizations.
If in User in Groups = A, B, C, D,E
If in User in Organization = A,C,E
Then in myagents = A,C,E
But the above rule is not working as expected, it is randomly taking values although if they are not part of User in Groups as well as User in Organizations.
Can you plz look into it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here in User in Groups and User in Organizations you can see that Jakeer and Malisha are part but in my agents you can see only one name got copied.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jakeer
Is customfield_10080 called myagents? Can you rename that field to something else?
Also, in the last step, you can remove updating the "Approvers" field, unless you want that.
If you cannot rename customfield_10080 to something else, you need to rename the variable from myagents to something else and update your if condition and also the last step where in advanced edit you are referencing {{myagents}}. replace every where in the rule where the variable is being referenced with the new variable name..
So do either of the steps, retrigger the rule and share the log once again,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have made the changes mentioned and in the result i am getting error.
Please find the attached logs screenshot.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the customfield_10080 field called?
Is it approvers?
Also what change have you made? Did you change the variable name? If so, share with me the screenshot of where variable is being defined in advanced branch and also edit issue screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
customfield_10080 is the field name myagents.
Please find the attached screenshot.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove the highlighted section below from edit/issue in your rule and retrigger and let me know what you observe
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.
Can you help me if it is possible through script in jira cloud.
If Assignee Group = L1heldesk
If Group(Organization) = HSBC then in
User in Groups = The all members present in L1helpdesk should be copied in this field.
User in Organizations= The all members present in HSBC should be copied in this field.
Finally the common members in User in Groups and User in Organizations needs to be copied in "myagents" field.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jakeer, First share with me the Edit issue screenshot again. That error means we are trying to update the same field in multiple places. And we need to remmove references to that field. So share screenshot to resolve that issue firts.
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.
Hello, in the drop down "Choose fields to set", unselect the field "myagents"..
It should just be the advanced section...
see below screenshot and rerun the rule and share audit log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After making the changes the automation showing errors and the audit log screenshot is shared below.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jakeer,
I want you to do 2 things:
1) In the advanced edit, you need to change {{myagents}} to {{JSMField}} .. right now you are trying to edit field with itself. See screenshot where I am referring to.
2) Insert a new log statement above where you are logging {{JSMField}} and log {{User in Organizations}} .
Do both, rerun the rule and share audit log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I made the changes mentioned above, in result automation is showing success.
But the values are not getting copied exactly.
If in User in Groups= A, B,C,D
If in User in Organizations = A,C,D
Common values are A,C,D But only A, D are getting copied if i refresh then A, C are getting copied then after i remove all values and refresh then all the values are getting copied.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you select the "For Each smart value" and share the screenshot. I need to see both the steps and For Each details section together like in below screenshot..
I *think* I know the issue and we may have to store these values teemporarily before we update.. but yes, please select For Each and share with me the screen shot..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jakeer,
I need the For Each section's details.. not the edit issue. lol
Also, the earlier log statement should be {{User in Organizations}} and not {{User in Organization}}.. please correct this..
Please share with me the screen shot of "For Each" and a newly run audit log so i can compare..
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.
Hello @Jakeer
I just tested and it worked for me. Only think I notice is that in your edit issue, you are again choosing a field in the "Choose fields to set" drop down... There should be no selection... We are using advanced section to edit the issue. Your edit issue screen should be like my below screenshot..
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.
Hello @Jakeer
Hope you are doing well. Looks like we have run into a bug in Jira here.
Looks like when we are trying to "add" within a For /Each logic, its not completing all the steps.
I am also able to reproduce the issue but I dont have a solution yet.
Let me think some more and I will update you if I find a work around. Apologies for all the back and forth with no solution.
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.