If you have deleted a project in Jira Server, and your log are exploiting with lines with this “error“:


2018-08-28 12:45:04,329 http-nio-8080-exec-75 WARN xxxxx 765x116124x4 1dq99dl 91.215.65.18 /rest/webResources/1.0/resources [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'XXXX'
2018-08-28 12:45:04,843 http-nio-8080-exec-110 WARN yyyy 765x116130x6 1dq99dl 91.215.65.18 /rest/api/2/issue/XXX-2857 [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'XXXX'
2018-08-28 12:45:04,860 http-nio-8080-exec-130 WARN jjjjjjj 765x116134x10 1845oa9 10.93.12.54 /rest/greenhopper/1.0/xboard/work/issue.json [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'XXXX'
2018-08-28 12:45:05,017 http-nio-8080-exec-92 WARN zzzzzzz 765x116137x11 1dq99dl 91.215.65.18 /rest/webResources/1.0/resources [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'XXXX'

You can fix it using Adaptavist Scriptrunner. Launching (and modifying) this Groovy code:


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.permission.PermissionSchemeManager;
import com.atlassian.jira.scheme.SchemeManager;
import com.atlassian.jira.scheme.Scheme;

def prList = ComponentAccessor.getProjectManager().getProjectByCurrentKey("XXXX")
PermissionSchemeManager permissionSchemeManager = ComponentAccessor.getPermissionSchemeManager();
Scheme permissionScheme = permissionSchemeManager.getSchemeObject("YYYYY");
permissionSchemeManager.addSchemeToProject(prList, permissionScheme);

By MrAddon

Advertisements
Posted by:.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s