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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom field value mirror to linked card

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 Sep 07, 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

thanks I'll give Trellinator a go

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

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 Sep 08, 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 :(

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 Sep 08, 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

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 Sep 08, 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

@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

Thanks @Iain Dooley working nicely now

Like Iain Dooley likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 What is Trello?

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...

817 views 13 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you