- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2024 06:24 AM
Hello everyone,
I'm currently setting up the Atlassian Jira Integration for Agile Development and have run into a bit of a challenge. While the connection and credentials are set up correctly and the basic module is running, I've encountered some issues with the default mapping which isn't ideal, but thats not the issue here :). My specific requirement is to only import projects that include the prefix "SN" in their names. We are using Jira on a server, and the action "Look up Server Projects" is being utilized for importing projects. I believe this action needs to be modified to accommodate our needs.
I've already checked the Jira documentation (https://docs.atlassian.com/software/jira/docs/api/REST/9.16.0/) but couldn't find a resource path or the necessary queries to filter projects by their name prefixes. Am I on the right track here, or am I missing something?
Any guidance or insights on how to adjust the "Look up Server Projects" action or any other part of the integration to meet this requirement would be greatly appreciated!
Thanks in advance for your help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2024 05:47 AM
Hello,
To customize Jira Integration for Agile Development and filter projects by the prefix "SN," you'll need to modify the "Look up Server Projects" action. While the Jira REST API documentation doesn't provide a direct way to filter projects by name prefixes, you can fetch all projects and then filter them programmatically.
Here's a basic approach:
- Fetch All Projects: Use the Jira REST API to get a list of all projects.
- Filter Projects by Prefix: Filter the fetched projects to only include those with the "SN" prefix.
Here's a sample script for the process:
import requests
# Jira server details
jira_url = 'https://your-jira-server.com/rest/api/2/project'
auth = ('your-username', 'your-api-token')
# Fetch all projects
response = requests.get(jira_url, auth=auth)
projects = response.json()
# Filter projects by prefix "SN"
filtered_projects = [project for project in projects if project['key'].startswith('SN')]
# Print filtered projects
print(filtered_projects)
If you need further customization or integration help, Impressico Business Solutions can provide expert guidance and support tailored to your specific requirements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2024 05:47 AM
Hello,
To customize Jira Integration for Agile Development and filter projects by the prefix "SN," you'll need to modify the "Look up Server Projects" action. While the Jira REST API documentation doesn't provide a direct way to filter projects by name prefixes, you can fetch all projects and then filter them programmatically.
Here's a basic approach:
- Fetch All Projects: Use the Jira REST API to get a list of all projects.
- Filter Projects by Prefix: Filter the fetched projects to only include those with the "SN" prefix.
Here's a sample script for the process:
import requests
# Jira server details
jira_url = 'https://your-jira-server.com/rest/api/2/project'
auth = ('your-username', 'your-api-token')
# Fetch all projects
response = requests.get(jira_url, auth=auth)
projects = response.json()
# Filter projects by prefix "SN"
filtered_projects = [project for project in projects if project['key'].startswith('SN')]
# Print filtered projects
print(filtered_projects)
If you need further customization or integration help, Impressico Business Solutions can provide expert guidance and support tailored to your specific requirements.