What do you mean by "first"? Components do not have any real order, they're an unordered set.
Standard recommendation here is to not be reading the database here (it's a mess, totally unsuitable for reporting) and look to using REST calls instead.
But if you must do it this way, you'll need to join jiraissue to nodeassociation, select for component link and then look to component to see the detail of the component(s). This will at least give you the list of components on an issue.
Hi Nic, thank you for your response; I agree that querying the database is too unreliable. Do you know of a better way to get this information? We have ScriptRunner, if that helps.
In this Jira instance, every issue is given one component on creation. However, there's a chance that it was changed to something else; it might have gone from one component to another or have additional components. What I'm trying to figure out is how to get this information for each component in the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the delay, this one slipped past me.
You'll want to read the change history for the issue, if that has any "component changed" lines in it, they will record the from and to, so you can read the earliest one of them for the "from". If there are no lines in the history for component change, then you know that the issue currently has the original component.
A single REST call to read an issue will return the whole thing in JSON which is easy to parse for the history and current component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.