Hi Team,
I am working on a forge app which has a use case to do certain operations on the trigger function. The trigger is invoked on change in the assignee field.
As part of the function being called for the trigger, I have initially done console.log to print a statement, then called a 3rd party API to do a certain task which also logs a statement.
I was trying to understand how this would behave when bulk updates are done. As Jira allows maximum bulk update on 1000 issues, I did a bulk update on 1000 issues for the assignee field which should trigger 1000 times ideally.
I did the bulk update operation 3 times and the results which I obtained are as:
1st time => 933 console.log statements but for the external service called it was logged 1000 times.
2nd time => 945 console.log statements but for the external service called it was logged 1000 times.
3rd time => 940 console.log statements but for the external service called it was logged 1000 times.
Can someone guide why in each case, there are different counts of console.log statements?
Does it mean the function was not triggered for those or it was triggered but it was not logged?
Because external service was logged 1000 times, it means it was called 1000 times.
Why is this behaviour inconsistent? Can someone suggest how can we resolve this?