Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,017
Community Members
 
Community Events
168
Community Groups

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 M 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 M 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 M 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 M 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 M 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 M Community Leader Jan 22, 2021

Comment

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

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

4,988 views 18 31
Read article

Atlassian Community Events