I am creating work items with automation to help the release process (trigger: version created) and one of the tasks is to prepare the smoke test of the release. I would like to display a list of issues to check for the given release, so I set up a JQL, inserted it as a link into the task's description.
My problem is that I would like to render it as a list. I can do that by hand by clicking on the column icon among the display options.
But I cannot achieve the same with the automation, it can create the card view only.
As I can see, the smart-card ending is used in both cases, so I don't know how to get the list view.
How could I create the list view with automation?
Unfortunately, as far as i know automation doesn't have a direct way to force the list view when creating smart-cards with JQL links. The [URL|smart-card] syntax always defaults to card view.
I think u can only achieve this is with the Send web request action instead of the standard Edit issue action. Using "type": "inlineCard" in the JSON payload.
| { "fields": { "description": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "type": "inlineCard", "attrs": { "url": "YOUR_JQL_URL_HERE" } } ] } ] } } } |
The only other option i can think is the manual approach, let automation create it as is, then manually click the column icon to switch to list view after the fact.
Hope this helps!
@Christos Markoulatos -Relational- thanks for the quick reply. I tried this method without an automation first but got this error:
{"errorMessages":[],"errors":{"description":"Operation value must be a string"}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried it with postman in my test instance and works.
try:
PUT https://nemetschekprime.atlassian.net/rest/api/3/issue/SSIM-100
body:
| { "fields": { "description": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Issues to check for this release:" } ] }, { "type": "paragraph", "content": [ { "type": "inlineCard", "attrs": { "url": "https://nemetschekprime.atlassian.net/issues/?jql=project=SSIM" } } ] } ] } } } |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Christos Markoulatos -Relational- thanks for all your hints!
The v2 API accepts only strings as description but the v3 works with the Atlassian Document Format. Using the (undocumented) blockCard content type, I was able to place a Jira Work Item List in list format with custom JQL and even custom column layout with this body:
{
"fields": {
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Issues to check for this release:"
}
]
},
{
"type": "blockCard",
"attrs": {
"url": "https://nemetschekprime.atlassian.net/issues/?jql=fixversion%20%3D%20%22The%20Release%22%20AND%20resolution%20in%20%28Done%2C%20Unresolved%29%20ORDER%20BY%20project%20DESC%2C%20parent%20DESC",
"datasource": {
"id": "xxxx",
"parameters": {
"jql": "fixversion = \"The Release\" AND resolution in (Done, Unresolved) ORDER BY project DESC, parent DESC",
"cloudId": "xxxx"
},
"views": [
{
"type": "table",
"properties": {
"columns": [
{
"key": "issuetype"
},
{
"key": "key"
},
{
"key": "summary"
},
{
"key": "priority"
},
{
"key": "status"
},
{
"key": "resolution"
}
]
}
}
]
}
}
}
]
}
}
}The id and cloudId comes from a GET request to the same endpoint.
So, this would work well but requires an API key that I don't have. I tried the Advanced field of the Edit work item action in automations, but it gave me the same error than the v2 API.
I need to stick with the manual method and change the view after creating the tasks automatically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.