Atlassian Development : Sample code to get the list of projects from your JIRA instance
Author
August 19, 2013
In this blog post, I will be sharing tips on how to populate a list of projects from your JIRA instance. The project list can be useful for features where you need to relate a particular issue to multiple projects or clone an issue under multiple projects.
Pranshu Goyal, Director of Products at Mirekta, states: “We envision DSM to be used by every small to a medium-sized organization dealing with bad data and want to get rid of duplicates easily with no cost. We have faced issues dealing with duplicates in our organization. That inspired us to make a solution that is not only simple to use but can be used widely to make the organization’s data clean to make them more efficient and productive. We want DSM to be a solution for every organization looking for duplicate management capability better than the Salesforce out-of-the-box solution with no additional cost.”
Getting the list of projects from JIRA database is a fairly straight forward task. Follow these steps to get the list:
First import the required classes in your java file where you want to fetch all the current JIRA projects. Here are the commands for the importing files
- import com.atlassian.jira.project.Project;
- import com.atlassian.jira.component.ComponentAccessor;
Now in the file, where you need to get the list of all current projects, write the following code
- List projects=ComponentAccessor.getProjectManager().getProjectObjects();
Here the object projects is an Array List of type com.atlassian.jira.project.Project. You can get all the information of the projects from this ArrayList. Simple enough?
Recent Posts
-
Service vs. Experience: Which Salesforce Cloud Wins the Support Battle?14 Apr 2026 Blog -
Change Data Capture and Asynchronous Apex Trigger14 Apr 2026 Blog -
NPSP to Nonprofit Cloud Migration Guide13 Apr 2026 E-Book -
NPSP to Nonprofit Cloud Migration Guide | Strategy & Steps07 Apr 2026 Blog -
The Psychology of Bugs06 Apr 2026 Blog -
Top Salesforce Testing Challenges and How to Solve Them06 Apr 2026 Blog -
How to Launch Your First Salesforce Experience Cloud Site: A Simple Guide31 Mar 2026 Blog -
What is Salesforce Experience Cloud? Your Gateway to Branded Digital Experiences30 Mar 2026 Blog -
Why Salesforce Marketing Cloud Contact Count Increases Unexpectedly and How to Fix It26 Mar 2026 Blog -
Salesforce Testing Framework: Making QA Work Simpler and More Effective25 Mar 2026 Blog -
Salesforce API Testing – The Modern QA Approach for Reliable Integrations05 Jan 2026 Blog -
Transforming SMB Sales with Salesforce Commerce Cloud12 Nov 2025 Blog -
Generative AI Testing tools03 Nov 2025 Blog -
Mirketa Unveils Next-Gen AI Solutions to Redefine the Future of Work Across Industries29 Jul 2025 Press Release -
Salesforce Implementation School Universities Higher Education23 Jul 2025 Blog -
Salesforce Health Cloud Implementation Partner: A Complete Guide23 Jul 2025 Blog -
XML Parsing: Using MINIDOM Vs Element Tree (etree) in Python02 Jul 2025 Blog -
A step by step Guide to create Salesforce web-to-lead form30 Jun 2025 Blog -
How AI is Transforming User Experience Design in 202526 Jun 2025 Blog -
How a Salesforce NPSP Consultant Can Elevate Nonprofit Impact25 Jun 2025 Blog -
Salesforce Load and Performance Testing: Essentials, Importance & Execution23 Jun 2025 Blog -
Salesforce Website Integration Boost Leads, Automation & Customer Experience11 Jun 2025 Blog -
Driving Results in Manufacturing with Salesforce Manufacturing Cloud11 Jun 2025 Blog -
Accelerating Growth with NetSuite SuiteCommerce02 Jun 2025 Blog -
Salesforce Service Cloud Services streamlining operations29 May 2025 Blog