How to clone checklist with smart values

Alena Samruk May 16, 2022

Hi!

How can I clone Checklist using smart values? I have a custome filed Checklist cf[11002]. I can't clone it usind standard filed in automation UX. How to clone it using smart value? We use this for checklist https://okapya.atlassian.net/servicedesk/customer/portal/3

2 answers

1 accepted

1 vote
Answer accepted
Maxime Lefebvre _Okapya_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2022
Hi Alena,
I tried to post you an answer yesterday but Atlassian community has bugs that prevents me from posting. (They keep telling me I've already posted that message)
To update a checklist field, you need to use our REST API format.
(Click "More options" in Automation)
I will post an example in another comment to see if I can make it work.
You can always contact our support if you need help with our App, we answer quickly!

Regards
Maxime Lefebvre _Okapya_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2022

{
    "fields": {
      "ChecklistFieldName": [
        {{#issue.ChecklistFieldName}}
          {
            "name": "{{name}}",
            "checked": {{checked}},
            "status": { "id": "{{status.id}}" }
          }
          {{^last}},{{/}}
        {{/}}
      ]
    }
}

Like # people like this
Alena Samruk May 18, 2022

@Maxime Lefebvre _Okapya_  thank you a lot! It works perfectly! 

Maxime Lefebvre _Okapya_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2022

This is great to hear!

Like Alena Samruk likes this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 16, 2022

Hi @Alena Samruk 

Are you using the built-in checkbox field or a marketplace addon app for checklists?

If you are having difficulty finding the correct smart value/custom field ID, please use this how-to article to find your field: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Alena Samruk May 17, 2022

Hi @Bill Sheboy ! Thanks for your answer! 

We use addone, linked above (https://okapya.atlassian.net/servicedesk/customer/portal/3) so it's not built-in field

 

Yes, I need to use JSON functions. I know field id (cf[11002]), but I don't know how to write the function correct. I've tried this, but it doesn't work (field is still empty)

{
"update": {
"customfield_11002": [
{
"add": "cloned"
}
]
}
}

 

So maybe you can help me with correct JSON functions text?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2022

First thing, were you trying to use "cloned" as an operator or as the value to set?  That is not a valid operator for the built-in JSON updates with automation rules.

 

Let's try the simplest possible JSON first to see if that works for your addon's field:

{ 
"fields": {
"customfield_11002": "{{triggerIssue.customfield_11002}}"
}
}

 

If that does not work, please find your vendor's documentation on the marketplace site, and they often show examples with automation rules and JSON for their fields.

Alena Samruk May 17, 2022

@Bill Sheboy  thanks for help! Unfortunately it doen't work for this field. JSON from your reply works with other fields, but not with this one. Will try to find answer in vendor's documentation

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2022

Sounds good.  Which addon are you using?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events