Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Custom field value mirror to linked card

Keith September 7, 2020

Hi all,

Has anyone managed to do this? 

Specifically after mirroring a custom date field when its changed from child to parent or parent to child if either is updated.

 

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2020

@Keith Hmm I tried this but it doesn't work:

when custom field "Mobile Number" is set, find the first card linked in the attachments, lookup a card with link "{triggercardlink}", and set custom field "Mobile Number" to "{{%Mobile Number}}

I thought that you might be able to look up the card to get a reference to the custom fields on it and set the value on the found card but doesn't look like it.

This Trellinator function will do it:

https://gist.github.com/iaindooley/a4c37292a1db16ddf5d40afdf136ca7c

You can read more about Trellinator here:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271

Keith September 7, 2020

thanks I'll give Trellinator a go

Keith September 8, 2020

looks like i've hit a rate limit. Can I control this?

Keith September 8, 2020

And I've noticed a lot of updates, can we tweak this?

 

In a day I've gone through all of my monthly allotted Trello "command runs"

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

@Keith hey, congrats on getting it set up :) regarding the updates I think the issue might be that the cards are reciprocally linked, so each time it updates one it updates the linked card and then goes around again, you can trigger only when it's not the Trellinator user that updates, here's a tweaked version:

https://gist.github.com/iaindooley/a4c37292a1db16ddf5d40afdf136ca7c

However if you set this up under your own Trello api key/token that would preclude it from working when you change also. That "notTrellinator()" method is most useful when you have created a separate bot account.

Regarding the rate limit, you might find that once you add the "notTrellinator()" call you don't hit the limit anymore, but if you do then you can always just put a:

Utilities.sleep(1000);

in. I sometimes have to do that if I'm running a thing that, for example, imports a spreadsheet into custom fields because the custom fields API is so HTTP API call heavy.

If you have Butler commands triggered on custom field updates then having the thing bounce back and forth between reciprocally linked cards is probably what caused that, if you prevent it from triggering when Trellinator makes the change, that'll stop it from exhausting your Butler commands. Note, though that Trellinator isn't constrained by the same Butler quotas, it's only constrained by Google Apps Script execution quotas (which are very very large by comparison) and the API rate limits which are pretty generous; I rarely run into them unless I'm doing the aforementioned spreadsheet import.

Sorry I should probably have grokked that you were going to have reciprocally linked cards and realised that the code needed to avoid triggering itself :(

Keith September 8, 2020

Thanks for that I'll give that a go.

 

I think I'll need to wait a bit. Where is this coming from Google Apps or the buffer on AWS?

function: setCustomFieldValueOnLinkedCard Exception: Service invoked too many times for one day: premium urlfetch.","Now coming to Global Commands..."]

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

@Keith that's coming from Google apps Script, it'll reset in a few hours, that's just due to the same thing, it was bouncing back and forth off itself and exhausted Google's quota. No worries though it'll just reset and start working again, however you might want to go into the ExecutionQueue sheet and clear out all the notifications, it'll bank them all up and retry them all once the quota resets otherwise

Keith September 8, 2020

Sorry @Iain Dooley but the rejigged function doesn't seem to work. Would you mind double checking that it is correct?

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

@Keith 2 things:

1) Are you still seeing the "Service invoked too many times for one day" error? It won't work until that stops happening :)

2) When you set this up, did you plug in your own API key/token? If so, then the bit that says "notTrellinator" is telling it to ignore any action that you take. In order for this to work you'd have to have Trellinator running as a separate "bot" user

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

@Keith oh, also I just took a look at the code and saw that it wasn't setting the variable "changed". Also it's better to check for a changed custom field before checking that it wasn't Trellinator that took the action, it'll use fewer API commands, here's another edit:

https://gist.github.com/iaindooley/a4c37292a1db16ddf5d40afdf136ca7c

Keith September 9, 2020

Thanks @Iain Dooley working nicely now

Like Iain Dooley likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events