Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to change the order of post functions in initial status?

https://confluence.atlassian.com/adminjiraserver072/advanced-workflow-configuration-828787971.html#Advancedworkflowconfiguration-addingaconditionAddingacondition

As the documentation stated, I tried to change the order of post functions.

I've added optional post function-create comment. But I can't place it above the 'create the issue originally'. Therefore, I can't see any change after adding it.

How can I change the order?

(I've tried to change the order in other status(steps) than 'initial status' without encountering any problems.
change_the_order_of_post_functions_20210122.png

2 comments

Pramodh Community Leader Jan 22, 2021

Hi @christina chuang

It's not possible in Jira

Thanks,
Pramodh

change_the_order_of_post_functions_2_20210122.pngThanks for replying.
Meaning the statement is not testable?
Would you mind telling me what's the difference if I add these optional post function(create comment, update issue status, and store issue)?

Many thanks,
Christina

Pramodh Community Leader Jan 22, 2021

Hi @christina chuang

Logically speaking first the issue has to be created, then update the fields.

Not sure why documentation says "before"

Thanks,
Pramodh

The "create comment" function only works when you are commenting on an existing issue, and there is no issue here until after you finish creating it.  So you can't do this, no matter where the post-function is placed.

Why are you trying to create a comment on a new issue?  If you have something to say about the issue when it is created, that should go into the issue, not be a comment. 

Pramodh Community Leader Jan 22, 2021

Hi @Nic Brough _Adaptavist_ 

Please help me understand here if I am correct.

The issues have to created to update the fields right?

Thanks,
Pramodh

Pramodh Community Leader Jan 22, 2021

Or how can be optional post functions in listed here is of use

Sort of, but it's hard to explain with single words like "update"

I want to explain it via the lifecycle of create and update:

There is no issue existing

  1. User hits create, and gives Jira a load of field data, and we get to the post-fuctions.  At this point, we have a ghost of an issue, not an actual issue.
  2. Create issue initially post-function runs, turning the ghost into an actual issue
  3. indexing and event firing happens
  4. We have an issue, and we decide to move it from new to in progress, so a transition is done
  5. The transition creates a ghost copy of the existing issue and the user makes changes to it (if there's a transition screen.  If there isn't, then the only user change is to where the issue is in the workflow)
  6. Post functions are started
  7. The data in the ghost is written back on to the existing issue
  8. indexing and event firing happens

Issue transitioned.

Now, if you want an automatic field change, you can use a post-function.  But you need to amend the ghosts during the transition, not the issue itself, so the post-functions need to be done before the "write ghost to issue" step.  So they need to be placed between processes 1 and 2 for create and between 6 and 7 for the transition.

The problem for this case is that comments are not a field.  They are not part of the issue, they are notes about the issue although they can only exist when they are in the context of an existing issue.  When you're transitioning an issue, you have an issue context for them.  When you're creating an issue, you don't have that.

Pramodh Community Leader Jan 22, 2021

Thank you @Nic Brough _Adaptavist_ :-)

It helped me understand so much, may I know where can we get these kinds of information.

That one was from simply having to learn it while being a jira admin (and developer).  I'm not sure it's documented anywhere, and if it is, it'll probably be deep in the developer docs.

Pramodh Community Leader Jan 22, 2021

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

676 views 17 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you