We created Security Levels that have the exact same names as the Components in a Project.
We added a Post Function that copies the name of the Component to the Security Level field. That results in an error:
Error creating issue: Unable to copy value from field 'Component/s' to 'Security Level'.
Is this something that's not supported?
It's not supported by whatever add-on you're using to provide the "copy" function.
This isn't too much of a surprise. A component is a component object and a security level another type of object. You could replace those object names with other object names to see whay it can't do it. "Please copy this penguin into a field expecting a haircut".
Thanks for the quick reply and the clear example! :)
Is there any other way the Security Level can be set based on the value of a field in an issue? We have an issue type that's used by multiple teams, and we don't want members of one team to be able to see another team's issues (and we want to avoid creating multiple projects).
You could have different workflows for issue types and put "set security level" post-functions in them.
Setting a level from fields generally requires a bit of coding though. The function you've found is close, it's just not quite expecting component -> security level. The code you'd need is pretty much "issue.first component.getName()" then "Find security level of that name and apply it"
The copy was attempted using a Post Function:
Copy Value From Other Field - Copies the value of one field to another, either within the same issue or from parent to sub-task.
I thought it was an OOB function, but I have a plain-vanilla JIRA test instance and it's not there. I think it's supplied by the JIRA Suite Utilities plugin.
Which add-on do you suggest we get to be able to script this? Script Runner?
Pretty much. I kow it can be done with SR, because I've done it.
I'm biased towards ScriptRunner because I use it a lot, and work for Adaptavist who now own it (of course, we have Jamie as well, and that makes it worse, because I have a team of SR experts I can offer beer to and get loads of help from them)
I suspect there are other "set security based on ..." add-ons out there. But I've not needed to look.
Yeah, I noticed the name of the company that puts out ScriptRunner appears in your username the other day!
Thanks - I gave Management the SR pricing info for our user tier (2000). The new projects use JIRA and OOB it does not do all the exotic stuff we do for the Legacy projects with ClearQuest hooks.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs