Description¶
Retrieves various information fields from a Jira issue, including DOIs, openICPSR URLs, SIVACOR IDs, manuscript information, and access restriction details. Designed for extracting structured data from AEA Data Editor Jira tickets.
Usage¶
python3 tools/jira_get_info.py <issue-key> [keyword]Arguments¶
issue-key (required) - Jira issue key (e.g., aearep-8361, AEAREP-1234, case-insensitive)
keyword (optional) - Type of information to retrieve (defaults to ‘doi’)
Keywords¶
doi- DOI (from RepositoryDOI or constructed from openICPSR fields)openicpsrurl- openICPSR alternate URLdcaf_private- Check if DCAF_Access_Restrictions_V2 contains “Yes, data can be made available privately” (returns “yes” if present, empty string otherwise)mcid- Manuscript Central Identifiermctitle- Manuscript title (extracted from Description field)sivacorid- SIVACOR ID
Examples¶
# Get DOI (default)
python3 tools/jira_get_info.py aearep-8361
# Get specific field
python3 tools/jira_get_info.py aearep-8361 openicpsrurl
python3 tools/jira_get_info.py aearep-8361 dcaf_private
python3 tools/jira_get_info.py aearep-8361 sivacorid
python3 tools/jira_get_info.py aearep-8361 mcid
python3 tools/jira_get_info.py aearep-8361 mctitleRequirements¶
Python >= 3.6
jira: Python Jira library
Environment Variables Required¶
JIRA_USERNAME- Your Jira email addressJIRA_API_KEY- API token from https://id .atlassian .com /manage -profile /security /api -tokens
To obtain a Jira API token:
Visit https://
id .atlassian .com /manage -profile /security /api -tokens Click “Create API token”
Copy the token and set it as
JIRA_API_KEYenvironment variable
Output¶
On success: Prints requested information to stdout
Not available: Prints nothing
Invalid keyword: Prints error to stderr and exits with code 1
Missing credentials or network errors: Exits silently with empty output
See Also¶
jira_add_comment.py - Post comments to Jira issues
jira_find_task_by_icpsr.py - Find Jira tasks by openICPSR ID