We are evaluating the plugin and want to use the setting of project metadata in a workflow condition and/or scripted validator.
Does anybody have groovy code that works with Jira 7.2+ that reads the value of a given key?
Thanks that was the post I couldn't find, got in working and pared down
The following works in a ScriptRunner script
def projectObject = issue.getProjectObject();
Issue myIssue = issue // needed for the getClass to work
// get named project metadata key, ignore the static checking error below, it works
def myKey = ComponentAccessor.getComponentOfType(myIssue.getClass().getClassLoader().findLoadedClass("com.atlassian.jira.plugin.JiraOsgiContainerManager")).getServiceTracker("com.osoboo.jira.metadata.MetadataService").getService().getMetadataValue(projectObject, "Key")
The role of IT professionals has become increasingly difficult over the last decade. Our organizations work in an increasingly software-powered world and IT professionals are expected to not...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events