Within an A4J rule I am setting an issue property. When viewing the property using the REST API the JSON is as below.
{
"key": "myKey",
"value": "myValue"
}
I need to backfill tickets (one time) with this property and want to use a script with the REST API to add it because it has to do some searching through the changelog to get at the value I want. Unfortunately after all my efforts I continue to end up with a property whose JSON is this when created with via the REST API.
{
"key": "myKey",
"value": {
"value": "myValue"
}
}
I simply use a PUT with https://myjira/rest/api/latest/issue/<key>/properties/myKey and a payload of '{"value":"myValue"}'
I use this property (myKey) in another A4J rule. To get at the value when the property is created by the A4J rule I can simply use {{issue.properties.myKey}}.
However, to get at the value when the property is created via REST API I would have to use {{issue.properties.myKey.value}}.
Bottom line is how do I create the property via the REST API so it has the same JSON as when creating in the A4J? Anyone with suggestions? Atlassian's documentation for the properties endpoint is, well, insufficient.
Online 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.