Forums

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

Adding Delay between Transitions in workflow in Jira

Ranganathan Arumugham April 24, 2018

Hi,

 

Is there any way that we can add a delay say 5 seconds in between two Transitions in a Workflow on Jira?

3 answers

0 votes
David Fischer
Community Champion
February 13, 2023

Hi @Ranganathan Arumugham 

are you on Server or Cloud?

0 votes
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.
April 25, 2018

The only sane reason for a delay would be that you're doing something asynchronously and want to wait for another process.  However, a delay is the wrong answer in this case, you need to code your processes to talk to each other properly.

But, if you insist on doing it the wrong way, either create a condition that says "only if issue X was updated more than 5 seconds ago" or put "sleep 5s" into a post-function on the first transition.

Anton Shevtsov February 13, 2023

Sorry for necroposting but one of the reasons to wait between transactions is to be sure that attachments were added to the ticket. 

I'm facing problem that I need to copy attachments from Parent issue to Child one, but neither Copy attachments, nore additional transaction after create Issue doesn't help. Jira still doesn't see attachments and do not copy them.

My workflow looks that way: Create issue from email with attachments -> Transition it to next Status -> Self-return transition with creation of related issue and copiing attachments to new one. But withiout delay it doesn't work

If any one can suggest decision of this problem - it would be highly appriciated.

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.
February 13, 2023

A delay is irrelevant here.  You need to code for a validator to check attachments were added.

You've got a problem with whatever you are doing to copy the attachments, not a delay.

Anton Shevtsov February 13, 2023

Validator will wait, untill attachments were added?

Anton Shevtsov February 13, 2023

Forgot to mention that all transitions are triggered automatically, without user actions. That's why I expected to use "Delay" so Jira has time to attach attachments

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.
February 13, 2023

Could you explain what you have set up here?  It makes no sense to have to "wait for attachments" - how are you attaching them?  What are you doing that runs before the attachments are attached?

Anton Shevtsov February 13, 2023

I have a project, where I create intermediate tickets from email with attachments. After ticket was created Jira creates child ticket in another project automatically and copies a list of fields. This is done with JMWE addon. The problem is that attachments are not copied. But when I perform this transition manually - all works well. It seems, that attachments appear in parent Jira ticket after the transition was performed, that's why I think about necessity of delay.

User, who performs automatical transition has all rights to create attachments

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.
February 13, 2023

Ok, that's most of the process perfectly clear, but how are you triggering "after issue created, create issue in another project"?

Anton Shevtsov February 13, 2023

When issue created I trigger transition called "Next" where JMWE post-function: Crete/Clone Issues placed. It is first in the list.

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.
February 14, 2023

Ok, so your "next" transition can only happen after the issue has been created, and that includes attaching things to it.

So that suggests that something is going wrong in the copy for this type of issue.

It worries me that you say the attachments only appear after you perform the next transition.  That suggests something else is adding them to the emailed issues.

So I'm a bit stuck on this one.

There is a test you could do though; most JMWE post-functions have an option for "delay" on them - I think the last time I used it, we could go up to 10 seconds.

You could use that to confirm the "delay" theory.  It'll annoy your users, as they'll have to wait too, but if it solves the problem, we can work around that!

Anton Shevtsov February 20, 2023

Thank you Nic. The delay function was excluded from JMWE plugin for Jira Data Center edition as I mentioned above. 

But you were right, there was a  permissions issue for user who performed that action. Now it seems to work fine.

0 votes
Mirek
Community Champion
April 25, 2018

Not sure about why you want to setup that kind of delay. Can you clarify what you would like to achieve?

Suggest an answer

Log in or Sign up to answer