Hi team,
Kindly assist in resolving below error, that I get while running a scriptrunner script in workflow post function.
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.permission.WorkflowBasedPermissionSchemeManager.removeSchemesFromProject() is applicable for argument types: (String) values: [AB]
I checked existing community answers as well but no luck.
Thanks
Ashima Bhatia
Hi team,
Thanks for the answers. Perhaps I did not specify the problem statement clearly.
Requirement: I want to archive a project whenever a workflow transition happens. There is a status in my workflow named 'Archive'. So, when I select this status, my project(which is passed as a field in project) must be archived.
For executing this, I have a archival script which runs perfectly on script runner console, but gives lots of errors when I pass it in post function of Archive status transition: custom script post function.
Before I share the script, is there any other way to achieve archival of project during status transition instead of using the script?
Thanks
Ashima Bhatia
For someone attempting to de-associate some schemes from a project in a workflow post-function, which all by itself is rather endearing and makes me question what you're doing, you certainly do have trouble reading the error message and thinking about what it's stating in plain english.
I truly have no idea why you would be calling that manager and trying to revoke some scheme from somewhere in a post-function. This really screams bad idea to me that should probably not be a post-function at all.
As Dirk already pointed out, and as the message states, you're passing an invalid data type into the `removeSchemesFromProject` method. Why you would need to call this method is a bigger question to me as opposed to what you're passing into it.
Before you fix that and move forward, I think it might be better to take a step back and think about what you're trying to do there, and whether it wouldn't make sense to do it in a better way. This does not sound like a good idea for a post-function in my opinion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share the piece of actual code that this error comes from? Seems like the argument you are passing is not the correct datatype.
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.