Error when copying to Security Level field

Jozef Vandenmooter July 12, 2017

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?

Thanks,

Jozef

 

 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 12, 2017

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". 

Jozef Vandenmooter July 12, 2017

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).

Thanks,

Jozef

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 12, 2017

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"

Jozef Vandenmooter July 13, 2017

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2017

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.

Jozef Vandenmooter July 14, 2017

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.

Jozef

Suggest an answer

Log in or Sign up to answer