I have a versionID and I want to retrieve the project's ID, name, Key, Lead, Category, etc
I retrieve the projectID with a versionID via http/REST with:
rest/api/2/version/{versionId}
I can then retrieve the other project details from
rest/api/2/project/{projectId}
... How would I go about retrieving the same information from within scriptrunner script, without using http requests?
I've tried using the ComponentAccessor's versionManager like this:
import com.atlassian.jira.component.ComponentAccessor
def ProjectManager = ComponentAccessor.projectManager
def VersionManager = ComponentAccessor.versionManager
long version = 23958
def versionObject = VersionManager.getVersion(version)
log.warn(versionObject)
...but I can't figure out how to get the projectID from the version object in this manner.
I agree with Fahd that this is a bug, but not necessarily that you should create a ticket before establishing it is a bug. In this case though I think it is, although imho com.atlassian.jira.issue.customfields.manager.OptionsManager#createOption should respect the order of creating and not insert them randomly.
I think your best bet is just to import them then sort them alphabetically, which imho is always clearer for users than a custom ordering.
Unfortunately there are situations when sorting alphabetically doesn't fit, like weekdays, months etc. :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
I would highly suggest that you raise a ticket in the plugin's issue tracker to address this issue to its developer - https://jamieechlin.atlassian.net
I believed this is something that need to be fixed within the plugin's codes itself.
Regards,
Fahd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
Can you provide me the code for
thanks in advance.
Regards,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.