post function update issue field not working

i am trying to set that default for the simple field, priority, in the create transition, of a specific workflow. although priority is an option in the post function called update issue field for simple issue fields...and gives me the value options i would expect, but it doesnt work. I am not getting an error messages to indicate a fail either.

i dont want to do it at a global level.

2 answers

I also attempted to have a custom date field for closed date automatically populate with current date in closed transition. this is not working either.

0 votes

A post-function sets data after the commit to the transition (and passing of validation).  That is far too late to "set a default", because a default happens as the user goes into the screen, and a post-function is way after they click "create" on that screen.

So, I am a little muddled on what you are trying to do.  Set a default?  Or not offer the user priority at all, and set it in the post-function? 

Also, your attempt to set a closed date - how are you trying to do that?   What's the post-function and what add-on is it from?

I get your thought process that it would be too late, but it is the first transition. If you are going to set a default for that workflow, it would have to go there in order for it to start from the beginning. I don't want to make this a global default in my instance, only for this workflow. I am trying to default the Priority field to be medium. I would also like to make this a required field-but again, only for this project. I have other items that trigger with the create transition such as to fire an event and trigger a notification. So why couldn't I also set the priority at this point to medium?

my other default setting for closed date, I want to automatically set the date and time of an issue that is closed so that I can use it later for filtering and reporting. I really don't want to depend on my users to enter the correct time. Mostly because we work across many time zones. 

Think of the order in which things happen:

  • User clicks create
  • Screen is drawn
  • User enters data
  • User clicks "commit"
  • Validation occurs
  • Post-functions happen

For the other transitions, it's much the same, but it has "check conditions" before "user clicks create".  So you can see why post-functions are "too late".

Your defaults can be set by setting the defaults in the fields, although that's not as flexible as it could be (defaulting dates to "2 weeks from now" for example, is a pain).  I'd use the Behaviours functions in the Script Runner add-on to do that sort of thing.

This, of course, only applies at the point at which "screen is drawn".  If you have other "items that trigger the create", you'll need to think about what they do and how they do it, as "defaults" should probably be done by those processes.


my users click create again, not commit button. so maybe that is the difference.


No.  I used "commit" to say "they complete the transition", as the next bit was about other transitions.  For "create", it will be labelled "create"

There is no "difference".  The list I gave is the process that happens for create.  I'm not sure what you saying what the "difference" is.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,154 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you