Hi @Jamie Echlin [Adaptavist] ,
Is it possible to write behaviour for a workflow transition ?
Use Case :
On a transition 'In Progress'
Is this possible ? I know that workflow Validator does not work as it can only do Regular Expression Check, but we would like fields on Transition screen to be changed based on a custom field value change.
Thank you
Chander
Seems like there are multiple questions here, but in a behaviour you can get the current FieldScreen using getFieldScreen(), so eg:
if (getFieldScreen().name == "Some Screen Name) { ...
or you can get the action name with getActionName()
Hey Jamie,
How do I add a condition to display only certain fields on transition screen.
This is the behavior i am writing on a select list field Category
def cField = getFieldById(getFieldChanged()) def cccField = getFieldByName("Committed CRO Complete") def facField= getFieldByName("Forecast/Actual CRO complete") def clField = getFieldByName("Committed Launch") def falField = getFieldByName("Forecast/Actual Launch") def selectedOption = cField.getValue() as String if ((selectedOption == "Capability")) { // clField and falField should be hidden on Tranistion Screen name "P3 Transition" clField.setHidden(true) falField.setHidden(true) }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - I answered your question. What is unclear?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My question is,Will behaviors work on Transition screens ? Did i miss documentation on https://scriptrunner.adaptavist.com/4.3.1/jira/behaviours-overview.html ?
Please check my code. Am i doing anything wrong ?
script-snapshot.PNG
Please advise for any modifications in code above.
Regards
Chander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It may be easier to have a condition that allows or denies the transition based on the field value. You would then have two transitions and two transition screens. However, I presume Category and 'A' are the same field. If not what happens if they select Engineering for Category and something else for 'A'? I've done this type of things lots of times.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Joe, That was mistyped earlier, Category and A were same.
However, I am looking for only single Transition In Progress (Action ID : 21) and a single Transition Screen (In Progress Transition screen)
The workflow is like, Any status can be transitioned to In Progress status on same transition (re use of a transition)
Is there a way to do this either by writing behaviour or a groovy script ? I am using Script Runner plugin.
Regards
Chander Inguva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.