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

christina chuang January 22, 2021

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

10 answers

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021
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.
January 22, 2021

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.

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

Thank you @Nic Brough -Adaptavist- :-)

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

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.
January 22, 2021

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.

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

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

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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

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.
January 22, 2021

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. 

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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

0 votes
christina chuang January 22, 2021

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

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

Hi @christina chuang

It's not possible in Jira

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer