Butler rule that converts a checklist item, is then blind to the checklist linked item
Asked by Vongsawat:

Edit1: Further tests show it has nothing to do with the renaming. Still blind even without the rename. Take the link it couldn't find and put it in to another butler command and it works fine. Just not in the rule that created the linked item.  

Edit2: Has nothing to do with the conversion in to a linked card. Its the fact that its triggering on checklist item creation is most likely the problem  

Edit3: I am completely bamboozled. Blindness has disappeared overnight.. Tests that didn't work last night now work. I have no idea whats going on...  

Edit4: Different niche cases overlapping, accepted answer lists blindness to a good enough degree for now

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/101901i1CD2EC2123792B5B/image-dimensions/349x512?v=v2 "image.png")  
Butler cannot find the checklist item named NewTitle. Trying to check !NewTitle also fails.  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/101903iE78A9DA4FF5625CA/image-size/large?v=v2&px=999 "image.png")

Even fetching the card link to search the checklist item by is no use. I've tried having it regurgitate what the existing checklist items are (just before I try search for said item), and the plainstext url are identical. It just can't find it!  

Anyone have any ideas? Hopefully one that can be limited to a single rule


Answers:
author: Vongsawat
body: Thanks [@milynnus](/t5/user/viewprofilepage/user-id/3947182) for putting me on the right path. Started putting in a bunch of possible undocumented variables such as Check Item {checklistitemid}/{checklistitemidlong}/{checklistitemlink}  

Even though none of these print out anything... inserting {checklistitemlink} in to Check Item actually worked!  

Edit: After burning way too many command runs trying to figure out the intersection of a bunch of niche cases:  
- Normally you can Check Item using name or url (as well as the undocumented checklistitemlink)  
- If its during a command that triggered on item creation and converted the item, you cannot Check Item with url (but name still works) (not enough command runs to figure out if item creation or conversion specifically is the problem)  
- If renamed, Check Item doesn't work with names either as checklist items do not stay up-to-date until you refresh the page. Edit2: And thus it only works with the old name (as of conversion)  
- Edit3: "Link the card with the item" acts slightly different to conversion, and Check Item doesn't work for any kind of name, whether searching for the name before or after the linking


author: milynnus
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) a card has only one short_url to card created through checklist item and the card name is that of checklist item name.

To link back to item, other than search for all the items for a match name is the only way. This will not be possible if you change the name.

Before last video, I did have a calendar app but in that scenario, I kept the item ID as a custom field to locate the item. IDs remains unchanged throughout Trello. So a card copy is not a true copy because IDs are different.

This applies the same with due and assignment on cards created this way. That Is why you have to handle these in your projects. Butler use the same set of API on the same Trello architecture.

comments: author: Vongsawat
body: As mentioned in the edit, this problem persists even if you don't change the name.

The problem happens at the Check Item stage, where it cannot find the checklist item either by card name nor short_url.

Actually finding and navigating between the card and the created card is not a problem


author: milynnus
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) I agree with you on "Actually finding and navigating between the card and the created card is not a problem" and you are right in saying that problem arise even without a name change.

What I was referring to is that a created card bares not relationship with the checklist item because it does not keep the item id in the card. That is why the calendar mock up I kept a custom field for the \*checklist item id\* on the created card. Without this mechanism you need to find a matching name....by the way, the checklist id is also not kept.

So you and I are pretty much on the same page.


author: Vongsawat
body: Hmm, not sure if I misunderstanding you or not..  

The created card and the checklist item bare a relationship in that they share both the url and the name. And that trying to match either the name or url of the checklistitem *normally* works.  

But if done during the same rule that did the card conversion, match name *fails.*Are you saying you know a way to match name the checklist item by name/url? or that there is a way to get the checklistitemid?


author: Vongsawat
body: Just made an Edit2. Apparently it has nothing to do with (edit)conversion. But rather that you can't matchname to find a checklist item during a command that *creates* the checklist item.  

Your latest reply did have me try checking if checklist item id was actually kept or not... and surprisingly, even though different variation of the variable don't print anything out, {checklistitemlink} *did* surprisingly work! You cant see what the link *is,* but the command will take it as a valid input anyways. Submitted that as an answer, as I don't think that was what you had in mind, but thanks! hah  

Edit: wait.. something fishy is going on... may need further testing to figure out whats going on..


author: Vongsawat
body: Different edge cases overlapping. Didn't do enough tests to isolate the niche cases so made some bad assumptions earlier on.  

You could Check Item for URL, but not during command where item was created/converted (not sure on distinction).  

And you can Check Item by Name, just not after rename.  

{checklistitemlink} is still a surprising find that works unless you overwrite it, which is great regardless.


author: milynnus
body: ![Screen Shot 2020-07-07 at 8.45.55 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/101981iAA2C11573B1538CE/image-size/large?v=v2&px=999 "Screen Shot 2020-07-07 at 8.45.55 PM.png")

Based on the above. Although the created card Superman is re-named to Spiderman, the card.short_url does not change and that is why you can still locate the source card. The name (url) on checklist can change from <https://trello.com/c/kBpSpFgq/2-spiderman> to [https://trello.com/c/kBpSpFgq/2-ironman.](https://trello.com/c/kBpSpFgq/2-spiderman)It will still work as a link to Spiderman. I don't think it will work if the change goes beyond that it will break the trello link (probably not found by then) by will remain as a hyperlink.


author: Vongsawat
body: To simplify our communication, Trello and Butler already do this natively. They will always use the shorturl form [https://trello.com/c/kBpSpFgq](https://trello.com/c/kBpSpFgq/2-spiderman) . So normally in Butler you would just match name for the short url. You could also match for the linked card's name (unless you rename it, as Trello does not update the names until you refresh F5)  

And the initial pre-edited question outlined how both match url and match name functionality *did not work* in the specific Butler example case. Even when "plainstext url are identical". Which was why your insistence (or at least its what I figure is your solution) on just matching url/name anyways was so confusing for me.. Maybe you did not read the paragraph at the bottom?  

Anyways, after much back and forth over multiple overlapping potential causes, this was because you *could not* match url (or card name) to find the checklist item during a command that had also just converted the item to a linked item.  

The final solution was to manually (in Butler still) link the items, rather than rely on Butler's two conversion options. Technically {checklistitemlink} was a potential answer as well, but in my specific use-case (not pictured in OP) I had overwritten it by the time I needed it so it was a no-go.


author: milynnus
body: I will add to what I learnt today and that is the is some intelligence in the URL such that it is able to keep things in sync so Long you don't destroy that integrity entirely. I add this to the fact that IDs do not change and there there is high possibility that users might destroy say a list name I would go for the ID. In any case, I am Glad to have met some one who likes the nuts and bolts of things. Have a good day/ night wherever you are on this great planet.


author: milynnus
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) I changed my program to use short_url. It helps mitigate problems like card renamed on created cards. Thanks.


Tags: butler