Forums

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

When transitioning from 'on hold' status to any other status, the 'on hold reason'

abbas baman
Contributor
June 17, 2020

When transitioning from 'on hold' status to any other status, the 'on hold reason' should automatically change to 'not on hold'

@Callum Carlile _Automation Consultants_   @John Funk 

can anyone please help me to resolve this 

2020-06-17 16_03_59-Window.png

2 answers

0 votes
Callum Carlile _Automation Consultants_
Community Champion
June 18, 2020

@abbas baman ^ ScriptRunner would be a good option. If you weren't as comfortable with scripting then Automation for Jira is an alternative:

Full paid version here

Free version here (I believe you get 300 free rule executions per month so this may be enough)

You can set a trigger (e.g. Issue transitioned from A to B, leaving B blank to match all statuses) and an action (Update a custom field on an issue to match your criteria). You would also need to set up a second rule to clear this value on transitions in the opposite direction

Automation Rule.PNG

abbas baman
Contributor
June 20, 2020

Hi @Callum Carlile _Automation Consultants_  once again thanks for coming up with useful information I have installed free version could you please help me to show steps how I can achieve this because as I am new to jira 

abbas baman
Contributor
June 21, 2020

Hi @Callum Carlile _Automation Consultants_  Could you please help me to show the steps I have installed automation for Jira 2020-06-21_1448.png 

Callum Carlile _Automation Consultants_
Community Champion
June 22, 2020

@abbas baman

  1. Select the 'Issue transitioned' trigger, adding On Hold to the first field and leaving the second field blank to map to all statuses
  2. Add a new condition if required (maybe you want to limit the automation down to one particular project or something, if no conditions are required then you will not need to add one)
  3. Select New Action then Edit Issue, select the On Hold Reason field and then select the Not On Hold option
  4. Save this rule and make sure it's enabled.
  5. Test the rule out to make sure it's working

:)

abbas baman
Contributor
June 23, 2020

Hi @Callum Carlile _Automation Consultants_ thanks a lot for your help once again could you please check and cross-verified is this correct so I can apply on the production server 2020-06-23_2218.png

Callum Carlile _Automation Consultants_
Community Champion
June 24, 2020

@abbas baman This looks like it should work, but I'd suggest testing it somewhere before applying this to a production environment

abbas baman
Contributor
June 24, 2020

Hi @Callum Carlile _Automation Consultants_  its working the opposite when I set status to 'on hold' it is automatically changing 'on hold reason' to 'not on hold this does not make sense when a status is changed from 'on hold' to something else, then the 'on hold reason' field should change to 'not on hold'

Callum Carlile _Automation Consultants_
Community Champion
June 25, 2020

In the Action in your screenshot above, double check that the On Hold Reason is being changed to 'Not on Hold', as you have set the trigger as 'When issue is transitioned from On Hold'.

You will need 2 rules,

  1. When the issue is transitioned TO On Hold, the On Hold Reason field is changed to On Hold
  2. When the issue is transitioned FROM On Hold, the On Hold Reason field is changed to Not on Hold
abbas baman
Contributor
June 25, 2020

Hi @Callum Carlile _Automation Consultants_  while applying 1. method I can't see 'On Hold' filed in drop down 

2020-06-25_1958.png

Callum Carlile _Automation Consultants_
Community Champion
June 25, 2020

@abbas baman Does the option exist within the field?

Thinking about it, should there be a reason of On hold? Would this not manually be set to Blocked, Other etc. when transitioning to the On Hold status? There isn't much point in having an On Hold Reason of 'on hold' when the status makes it clear that the issue is on hold

abbas baman
Contributor
July 1, 2020

Hi @Callum Carlile _Automation Consultants_   did you get any solution for this?

Callum Carlile July 2, 2020

@abbas baman As I said above, try double checking the field settings to make sure that you have an On Hold option

Callum Carlile _Automation Consultants_
Community Champion
July 2, 2020

@abbas baman As mentioned above, it's worth double checking that you have created an On Hold value for the field, as in your initial screenshot it doesn't look like it's there

abbas baman
Contributor
July 3, 2020

Hi @Callum Carlile _Automation Consultants_ I have added 'on hold' is a transition I have added and 'on hold reason' is a 2020-07-03_1705.pngcustom field that I have added please refer below screenshot for more info

2020-07-03_1706.png

abbas baman
Contributor
July 4, 2020

Hi @Callum Carlile _Automation Consultants_ @Callum Carlile Could you please give me reply i need to do finish this on high priority 

Callum Carlile _Automation Consultants_
Community Champion
July 4, 2020

@abbas baman there was no question in your last post, I don’t know what you’re asking! Have you followed the steps I said and checked that you have added an ‘on hold’ value as a custom field option?

Like Nic Brough -Adaptavist- likes this
abbas baman
Contributor
July 4, 2020

Hi @Callum Carlile _Automation Consultants_  'on hold' is transition and 'on hold reason' is a custom field which has four value as  you can see in the above screenshot so my requirement is "When transitioning from 'on hold' status to any other status, the 'on hold reason' should automatically change to 'not on hold; " how to achieve this 

Callum Carlile _Automation Consultants_
Community Champion
July 4, 2020

@abbas baman Based on your screenshot, it looks like 'On Hold' is a status, (the transitions are the arrows between statuses. Here's what you need to do:

  1. Create a project automation rule (via Project Settings > Project Automation)
    1. Add a Trigger of when an issue is transitioned (From On Hold, then leave the To field blank)
    2. Add the Action of Edit field value, select your On Hold Reason custom field, then select the Not on Hold value
    3. Give the rule a name and publish it

This will give all issues transitioning from the On Hold status > all other available statuses an On Hold Reason value of Not On Hold

abbas baman
Contributor
July 5, 2020

Hi @Callum Carlile _Automation Consultants_ it is working fine but one more thing it is only working for me is it because I am system admin not for another user2020-07-06_0846.png could you please help me to resolve this thanks a lot 

abbas baman
Contributor
July 6, 2020

Hi @Callum Carlile _Automation Consultants_ could you please help me to resolve this issue 

Callum Carlile _Automation Consultants_
Community Champion
July 6, 2020

@abbas baman This rule should work for all issues in the Tekinsure project, you're listed as the owner of the issue but if someone else transitioned an issue in this project then the rule will still apply

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  it is working fine when I am changing the status from 'on hold' and from that 'on hold reason ' but when I directly selecting 'on hold reason' from drop-down it is not changing could you please check the GIF and help me out 

 

jira11.gif

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman That's because it's not set up to do that.

The automation rule's trigger is when the issue is transitioned, which causes the action of changing the field value.

If you want to transition the issue when you change the field value, you will need to create another rule where the trigger is the field value changing, and the action is the transition

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_ oh Okie thanks could you please help me show the steps. How to trigger field value. Thanks in advance 

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman 

  1. Add trigger of Field value changed and select the field
  2. Add a JQL filter component to filter out all values that aren't "Not on Hold" ("On Hold Reason" != "Not On Hold"
  3. Add an action to transition the issue to the status you want to transition to
abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  i am not able to find field value trigger could you please tell where i can get that  2020-07-07_2141.png

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

It might be missing if you're using the lite version for automation for Jira. You can use the Issue Updated trigger instead, then the filter mentioned above should still cover it

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  sorry to disturb you again and again but i am totally new so that why thanks for your support so far but with updated trigger what was the next step could you please show me after issue update trigger showing like this 2020-07-07_2151.png

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman The next steps will be the same as I mentioned above:

  1. Add a new condition - use the JQL filter component to filter out all values that aren't "Not on Hold" (add "On Hold Reason" != "Not On Hold" to the JQL text box)
  2. Add an action to transition the issue to the status you want to transition to
abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_ is this right could you please 2020-07-07_2231.png

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_ I am confused in your second point I want to achieve 

whenever'on hold' status to any other status, the 'on hold reason' the 'on hold reason' should be 'not on hold'

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman In that case, enter the JQL

"On Hold Reason" = "Not On Hold" for the condition (remove the ! from your the condition in your screenshot)

Then for the action, select the transition action to transition the issue from On Hold --> all other statuses which On Hold transitions to.

In your screenshot, you're currently transitioning the issue TO On Hold, but you want to transition the issue away from it, as the issue will already be in On Hold

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  could you please check below is correct one 

 

2020-07-08_0014.png

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  please check GIF and guide me what Ijiraaqwewedwd11.gif need to choose 

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman No this is not right, you have selected the create transition, os the rule will not work.

In the gif you sent earlier, you said that when you change the On Hold Reason field value to Not On Hold, you wanted the issue to automatically transition from On Hold. THIS transition, from On Hold --> Some other status, is the transition which you need to enter as the action here.

And you do not need to set the field value to Not on Hold in the action, as this is the trigger for the automation, so it has already been changed.

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  what is my requirement is now when I change 'on hold reason' for example 'other urgent work' from the drop-down list and I am changing status 'send for review' as you can see below screenshot than 'on hold reason' should be automatically changed to 'not on hold' from drop-down list hope from below gif it would help to understand the issue.abbasjiraaqwewedwd11.gif

Callum Carlile _Automation Consultants_
Community Champion
July 7, 2020

@abbas baman That's the same requirement you were describing yesterday, the automation rule previously set up should change the field value to Not on Hold if it was set up as described.

abbas baman
Contributor
July 7, 2020

Hi @Callum Carlile _Automation Consultants_  thanks but I am confused in the second point what do I need to select the status of transition than in destination status what I2020-07-08_1022.png need to select than in below field do i need to select any other things 

abbas baman
Contributor
July 8, 2020

Hi @Callum Carlile _Automation Consultants_  could you please help me with the above issue. Thanks in advance 

Callum Carlile _Automation Consultants_
Community Champion
July 8, 2020

@abbas baman You just need to select the second checkbox (specific transition) and add the transition that you're wanting to transition the issue to.

abbas baman
Contributor
July 8, 2020

Hi @Callum Carlile _Automation Consultants_ I have followed what you have said as you can see below gif when I am changing 'on hold reason' from the drop-down list and when the transition is changed the 'on hold reason ' is not automatically changing to 'not on hold.

  

abbasjiraaqwewasedwd11.gif

 

please check below automation which I have set for this as you told 

2020-07-08_2342.png

abbas baman
Contributor
July 9, 2020

Hi @Callum Carlile _Automation Consultants_  did find any thing 

Callum Carlile _Automation Consultants_
Community Champion
July 9, 2020

@abbas baman In that case, you will need to set the On Hold Reason field value in the action to Not on Hold.

Also You might want to re-look at the transition you've selected, as this is different from what you previously explained. You have selected the Create issue transition

abbas baman
Contributor
July 9, 2020

Hi @Callum Carlile _Automation Consultants_  than do I need to remove JQL query could you please check below attachment for the same could you please list down steps freshly from the beginning ...BECAUSE I did some changes but while referencing browser value is getting changing not from status when I need to click...it should be like when I need to jump from one status to other than value needs to be changed not on browser reload

 

 

BAMAabbasjiraaqwewasedwd11.gif

2020-07-09_2152.png

abbas baman
Contributor
July 9, 2020

Hi @Callum Carlile _Automation Consultants_  I have done the below changes as you can see in the screenshot but now what happening is that when I reload the browser the 'on hold reason' changed to 'not on hold'  for example now 'on hold reason' is 'blocked' but now when I reload browser value changed to 'not on hold'  technical it won't happen value only changed when we jumped from one status to another.  

BAMAabbasjiraaqwewasedwd11.gif

2020-07-09_2152.png

abbas baman
Contributor
July 10, 2020

Hi @Callum Carlile _Automation Consultants_  any update on above issue 

abbas baman
Contributor
July 13, 2020
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.
June 17, 2020

You will need an app to provide a post-function that can update your custom field.

abbas baman
Contributor
June 17, 2020

Hi @Nic Brough -Adaptavist-  thanks for your reply could you please let me know which app I need and it is paid or free and what would be the process 

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.
June 17, 2020

I'd use Scriptrunner (paid) but that's because I work for the vendor and have it available on almost all the systems I work with. 

There are alternatives, but I'm not actually too familiar with them, as I just use SR.  The Jira Toolkit, Automation and Jira Suite Utilities may be worth a look, Jira Misc Workflow Extensions and Power Scripts can definitely do it.  I'm sure there are others in the marketplace, and it's not painful to write your own (heck even I wrote a plugin to give a post-function for "change custom field" before I Scriptrunner existed)

Suggest an answer

Log in or Sign up to answer