A tool to manage default configurations for Jira projects.
Project description
jira-field-sync
A Python tool for managing project-level custom field defaults in Jira. Think of it as a "set it and forget it" solution for keeping your Jira fields consistent across projects.
What Problem Does This Solve?
Managing custom field values across multiple Jira projects can be tedious and error-prone. This tool helps you:
- Set default values for custom fields at the project level
- Automatically update existing issues missing the correct values
- Create automation rules to maintain these defaults for new issues
- Monitor compliance across your projects
For example, you might want all issues in your R&D projects to have "R&D" as their Line of Business (LOB), while your Sales projects should have "Sales" as their LOB. Note that this tool only updates existing custom fields - it cannot create new ones. You'll need to create any custom fields through the Jira UI first.
Prerequisites
Before you start:
-
Jira Access
- An Atlassian account with admin or project admin permissions
- An API token
- Write access to the projects you want to manage
-
Project Configuration
- The custom fields must be added to your project's screens
- Field options (like "R&D", "Sales", etc.) must be pre-configured in Jira
- Projects should be either company-managed or next-gen
-
System Requirements
- Python 3.7 or higher
- pip for package installation
Installation
pip install jira-field-sync
Or from source:
git clone https://github.com/ergut/jira-field-sync
cd jira-field-sync
pip install -e .
Finding Field IDs
Before configuring the tool, you'll need to find the IDs of your custom fields in Jira. Here's how:
- Go to Jira Settings > Issues
- Click on "Custom fields"
- Direct URL:
https://your-domain.atlassian.net/secure/admin/ViewCustomFields.jspa
- Direct URL:
- Search for your field (e.g. "LOB")
- Click on it and then click "Edit details"
- In the URL or on the page, you'll see the ID number (e.g.
11196) - The field ID to use in configuration is
customfield_followed by this number (e.g.customfield_11196)
Note: You need admin access to view custom field settings.
Configuration
Create a defaults.yaml file in your preferred location:
# Jira instance configuration
jira:
url: "https://your-domain.atlassian.net"
email: "your.email@example.com"
token: "your-api-token"
# Field configurations
fields:
lob: # Line of Business field
id: "customfield_11196"
projects:
ARGE: "R&D"
SALES: "Sales"
MKTG: "Marketing"
Each field configuration needs:
- A descriptive name (e.g., "lob")
- The Jira custom field ID (found using steps above)
- A mapping of project keys to their default values
Usage
Basic usage (provide the full path to your config file):
jira-field-sync /path/to/your/defaults.yaml
Check what would change without making updates:
jira-field-sync /path/to/your/defaults.yaml --dry-run
View current status:
jira-field-sync /path/to/your/defaults.yaml --status
How It Works
When you run the tool, it:
- Validates your configuration against available field options
- Finds issues missing the correct default values
- Updates those issues to match project defaults
- Generates detailed logs and reports
Note: While we initially planned to include automation rules for new issues, this feature isn't currently possible due to limitations in Jira's API. The Jira Cloud REST API doesn't provide endpoints for programmatically creating or managing automation rules.
Logging
The tool creates detailed logs in the logs directory:
- Daily log files with timestamp:
jira_update_YYYYMMDD.log - Console output for quick status checks
- Detailed error reporting and success tracking
Contributing
Contributions are welcome! Check out our Roadmap for planned features and improvements.
Sponsorship
This project is proudly sponsored by:
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jira_field_sync-0.2.0.tar.gz.
File metadata
- Download URL: jira_field_sync-0.2.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c399f7a99807b19fb69e7bb4adbe6fbee645c6cffa6a06373bb033e3648f51
|
|
| MD5 |
a02e1b7db93ffb42d9b94a121c73df30
|
|
| BLAKE2b-256 |
9b6cb8007412f9267f43f505054fbed7ac85bcf19fea081fe1533f52b52bee13
|
File details
Details for the file jira_field_sync-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jira_field_sync-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de25ae23d711d8630bbcd27fda96e2b612d28ee47a3495722a3d26e83a0444fe
|
|
| MD5 |
170506c82514d9c10da18bf5e8111ffa
|
|
| BLAKE2b-256 |
c8216f1fecf1385a2021ef08798f12a5eef9bafe95ebd11a8bd9f8a87209df02
|