Hello,
In Jira I created a custom calculated field that shows me the ID of a default structure of a particular issue. The code is as follows:
@Formula:
import com.atlassian.jira.component.ComponentAccessor;
long id = 108;
try {
id = ComponentAccessor.getOSGiComponentInstanceOfType(
com.almworks.jira.structure.api.StructureServices.class
).getStructureConfiguration().getDefaultStructureId(
issueObject.getProjectObject()
);
} catch (Exception e) {}
if (id == 1) id = 108;
return id;
-->
After, in the structure I choose to view this custom field and it works fine (i.e. the value is calculated to each issue and there are any errors in the Jira log). But when I start Jira indexing in the log I get the following error:
Class: com.almworks.jira.structure.api.StructureServices not found in namespace : at Line: 7 :
and in the opened structure suddenly the value ARE NOT calculated to each issue.
Why is this happening? Could anybody help me?
Thanks a lot in advance!
Vladimir