Hello,
I have a problem with an autotransition that's been requested. I have attempted to design the workflow two different ways and neither has worked.
Design 1:
The Status 'Waiting for training date confirmation' has five statuses. As follows:
The four approval transitions have no screens and are meant to be removed from the screen once they have been executed by various users and can be executed in any order.
They each also have a post function that filles in the date/time of their corresponding custom field, like so:
image2016-2-18 13:26:32.png
I have placed the same sil script on each of the four approval transitions as a post function:
//To autotransition the task to 'Training Date Confirmed' status after verifying that PDM, TDU, EU, & Intl. approvals have a date value. if (isNotNull("Training date PDM approval") && isNotNull("Training date TDU approval")&& isNotNull("Training date EU approval") && isNotNull ("Training date Intl. approval")){ autotransition("Training date confirmed", key); }
Problems:
Design 2:
Like the design above but with the following changes.
I removed the transition 'Training date confirmed', the four approval statuses remain.
The approval statuses will now move the task to the next status instead of remaining the same
The sil script post function reads like the following (depending on which transition that it is attached to):
//To autotransition the task to 'Training Date Confirmed' status after verifying that PDM, TDU, EU, & Intl. approvals have a date value. if (isNotNull("Training date TDU approval")&& isNotNull("Training date EU approval") && isNotNull ("Training date Intl. approval")){ autotransition("PDM approval", key); } else { status = {"Waiting for training date confirmation"}; }
For example the above script is the post function for PDM approval only but the script for TDU approval will look like this:
//To autotransition the task to 'Training Date Confirmed' status after verifying that PDM, TDU, EU, & Intl. approvals have a date value. if (isNotNull("Training date PDM approval")&& isNotNull("Training date EU approval") && isNotNull ("Training date Intl. approval")){ autotransition("TDU approval", key); } else { status = {"Waiting for training date confirmation"}; }
Problem:
Any assistance you can provide or another way of designing this would be greatly appreciated. I've been fighting with this for about three weeks now, trying different things, but nothing I try is working.
Thank you,
Avril
Hi,
First of all, isNotNull routine expects the parameter without quotes.
Secondly, we have another routine, hasInput, which does pretty much the same think as "isNotNull", but is specific for postfunctions and validators.
Try to use
isNotNull(Training date PDM approval)
or
hasInput("Training date PDM approval")
Both of them should work.
Hope this helps,
Alexandra
Hi Alexandra,
Thank you for your response. I tried both of your suggestions. When I removed the quotes for the isNotNull, SIL Manager gave me lots of errors on the syntax.
I then switched out isNotNull with the hasInput.
Design 1:
It seems like the script is validating the values but it will not fire the auto-transition either when the 'Training date confirmed' transition is hidden or not.
Design 2:
The values are still not validated. The task will transition regardless.
Any other suggestions?
Thank you,
Avril
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of JJUPIN are you using? I guess the errors from the SIL Manager are because in your case, the name of the custom field contains spaces. Could you try to add an alias to that field and re-check it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexandra,
I'm using version 3.0.10. I tried your suggestion using an alias no go. I get the following in the logs: 'Training date confirmed' Not hidden from user in conditions.
2016... /rest/keplerrominfo/jjupin/latest/lf/initPage [commons.ivm.postactions.TransitionPostAction] Transition not found. Cannot execute autotransition().
'Training date confirmed' Hidden from user in conditions:
2016... /rest/keplerrominfo/jjupin/latest/lf/initPage [jira.commons.ivm.IssueVariableResolver] Script is not running in the context of an issue.Cannot get value for field key
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
So you've added in silalises file some lines like this, isn't it?
customfield_10604=dt1;
If you now use in your postfunction
isNotNull("dt1")
what happens?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.