Is there a "pre-function" in workflow? Similar to the "Post Function" assign function

agnes leigh March 22, 2017

 Need this function in workflow to assign value to custom fields before it is fired.

 

2 answers

3 votes
Vladimir January 7, 2020

Nic Brough, I do not agree. This is not a nonsense.

Pre actions is a very good idea.

1) Firstly, it will simplify very much the default values for workflow. 

So you can fill default values selected by workflow not by context of custom field.

2) Secondly it will be possible (at last) that you can put or change the default value to the user field and then the user can change it. It cannot be in post function.

3) Lastly, you can put any logic to the pre-function not only fill values but you can make possible to fill in the value if other field is filled in or if user has something and so on.

I just think it will help in some situations that now cannot be done or very complicated.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2017

No, as "pre function" is nonsense.  I think you mean you want to have default selections for values in fields.

JIRA has default values for issue create. 

It does not do default selections for edit or transition screens because forcing a default over the top of potentially currently correctly set fields would break your data and upset the users.

Mishelle Graney April 29, 2019

I think this would be a useful feature, especially as it relates to setting the Assignee.  Currently I can either use a post function to set the assignee, or I can allow the user doing the action to specify.  It would be useful to set to a given (default) user before showing the dialog, but still allow the user to change it.

Like Daniel Peralta likes this
Sergei Gridnevskii
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 19, 2019

Actually this is a good idea if there are many transitions to the state and you need to apply same function to all of them. With post functions you need to copy them to all affected transitions.

Milan Misenko July 2, 2020

PreFunction is very good idea. It is a pity that Jira doesn't support it.

You can set some fields conditionally in transition screens. They doesn't need to be stored to the issue in this time. They can be only on screen (in memory). They will be stored in issue after modifying and confirming by the user.
If user cancel transition issue will be not modified.

Suggest an answer

Log in or Sign up to answer