I have a question about best practices of the JAVA API.
I wonder what is the purpose and the usage related to the elements of the package com.atlassian.jira.bc . It seem to be a front for the managers interfaces of package com.atlassian.jira.
- What does bc stand for ?
- Is it a bad usage of the API to call directly the managers ?
If I want to work with custom fields , in which case should I use CustomFieldService or CustomFieldManager ?
I would love to know the answer to this as well. Just made another topic on this.
I can’t answer for Atlassian (and I have no idea what the bc stands for…) , but my general understanding is to prefer to use the services in com.atlassian.bc if at all possible.
Typically, things like the CustomFieldService will check permissions and validate the request before updating the custom field, where the lower-level manager in com.atlassian.issue will just do what you ask - usually ignoring permissions.
Usually, this means the service API’s are slightly more cumbersome to use, but way less likely to cause some low-level inconsistencies on the Jira side.
In some cases, we have had to use a lower level manager to fulfil some use case - like a JQL search that finds all issues by some filter regardless of permissions, but generally, we try to avoid doing this wherever possible. It usually ends up looking like a bad idea.
Good to know, but I have seen some functions that allow you to do those searches without consider permissions.