I want to read custom variables in regards to jira project via API / jira-python.
This project-specific configuration should then be used in some (external) scripts.
For now my best options seems to be to append some JSON (or similar) to the description, which could then be read and evaluated:
>>> import re, json
# fake some description
>>> description = """some project
/* project variables */
config = { "foo": "bar" }"""
# read the data from description variable
>>> re.search( r"config = (\{.*\})", description)
<re.Match object; span=(37, 62), match='config = { "foo": "bar" }'>
# evaluate in python
>>> json.loads( re.search( r"config = (\{.*\})", description).groups()[0])
{'foo': 'bar'}
Do you see some better solution?
(Perhaps even one, that could be evaluated from Jira Automation?)
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline 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.