Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i know transition was caused by hit button or script?

zeng qing March 19, 2021

I write workflow post functions in scriptRunner.

I need to know if a transition was caused by hit button or script

1 answer

1 accepted

2 votes
Answer accepted
Fazila Ashraf
Community Champion
March 19, 2021

@zeng qing  , in your script do you use any specific automation user account to action the transition? If you are letting it authorize as the current user or a general user, i do not see a way to differentiate. The history will be only record the user account, timestamp and change details and not further details on the change was triggered.

Nic Brough -Adaptavist-
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.
March 19, 2021

If you can't differentiate on the basis of user, then no, there's no way to know.

You can do it though - when you write a script that causes a transition, have it store data on the issue to record it (a custom field you don't bother to put on the view screens or cards is the simplest option).

Your post-functions can then read that (and clear it if you don't need it again)

zeng qing March 21, 2021

Can't agree more.Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events