Strange Error Message on Transition

Issue #796 resolved
MAG-II created an issue

Hello Fidel -

I am currently getting a strange error on a transition in my workflow. Attached is the error as well as the Post Function configurations. When this transition occurs, the Issue links to another Issue, changes that Issue's Label, and then advances that Issue one step in it's transition.

Every time I advance this transition I get the error message once, and then when I try to transition it again it works. I don't know how else to explain it. I am hoping I can get this bug figured out.

If you have any advice, please let me know. Thanks!

Comments (15)

  1. Fidel Castro Armario repo owner

    Hi @michaelgayheart,

    This issue is related with #248, #302, #310, #354, #408, #479 and #615.

    The cause is that you have some kind of condition or validation in the transition you want to execute that is not being satisfied. To solve the problem you should use Issue status (delayed writing) instead of Issue status. You should also execute your post-functions before the one fro triggering the event.

    Try the following 2 changes:

    1. Move your 2 post-functions at positions 1st and 2nd in execution order, i.e., above all the other ones.
    2. Select Issue status (delayed writing) instead of Issue status.
  2. MAG-II reporter

    Hi Fidel -

    Thanks for the response. Changing the order of the Post Functions (adding them to the first and second) does not execute what I am trying to do properly. In the circumstance where Post Function 6. is the first and 7. is the second, the Label (on the Linked Issue) does not change to Filled. If Post Function 7. is first and 6. is second then (strangely) the Label reads "Filled" "In"

    The screenshot attached is the Validator that I have for the Linked Issue.

    Also, I am not seeing an option in the original Issue's Post Functions that reads Issue Status (delayed writing)

    Linked Issue - Validator.png

  3. MAG-II reporter

    Sorry for the multiple messages -

    It does seem that Issue Status (delayed writing) does let me link the Issues without the first error message, however, at this point the Linked Issue does not automatically transition to - 9. Government Accept Candidate?

    Screen Shot 2017-09-12 at 3.36.47 PM.png

    *Update

    Working with Post Function 7. - When I place this Post Function at the very top, the Label does not update to Filled, thus I cannot transition it manually on its workflow. When 7 is at the very bottom the Label does update to Filled, but the automatic transition (to 9. Government Accept Candidate?) does not occur.

  4. Fidel Castro Armario repo owner

    Hi @michaelgayheart,

    Try the following changes:

    1. You don't need 2 post-functions. Since all the parameters in your 2 post-functions are the same, except parameter "Filtering linked issues or subtasks by status", you simply have to select both statuses in the same post-function: "8.2 Pending Government Acceptance" and "8. VALDOSTA II Bench".
    2. Use "Issue status" as target field.
    3. Use "New labels" instead of "Labels", and use Filled as source value.
    4. Move post-function to 1st position in execution order.
    5. Check "Transition is triggered by a JIRA Workflow Toolbox post-function." at parameter "Skip validation when:" in your boolean validation, like shown in the following screenshot: Captura de pantalla 2017-09-12 a las 23.54.12.png
  5. MAG-II reporter

    Fidel -

    Your advice worked fantastically. The "New Labels" as well as the "Skip Validation When:" really did the trick. Also It's great to have both the 8. and 8.3 statuses in one Post Function. I did, however, need to keep the Post Function as the last Post Function - not sure why. Regardless, this works great. As always THANK YOU. Below is the final configuration that worked -

    Final Configuration.png

  6. Fidel Castro Armario repo owner

    Hi @michaelgayheart,

    I don't find a cause for explaining the need to keep post-function at last position in execution order.

    You should use as Source Value for New labels the following string: Filled. You should remove field code for Labels from your current source value.

  7. MAG-II reporter

    Good Morning Fidel -

    I made your suggested changes, and it's almost working perfectly. Attached are the Post Function configurations. Again, the Post Function has to be executed last in order to work. When placed first the Label does not change to Filled. Not sure why.

    Anyway, the problem that I am having now is a bit different. When this post function is executed the Linked Issue advances a step in its workflow. That works well. There are 3 more steps in the Linked Issue's workflow, and then the Link between the two Issues breaks, and the Label changes back to None. That works at this point.

    However, there are instances when the Issue (now with Label None) can go back to the status in which the Label can be Filled again. When the Label gets Filled again, the None does not go away (see screenshot).

    I apologize if I am not explaining this well enough. I will provide as many screenshot examples as I can. As always, thanks for your help, and no rush.

    Post Function configuration.png

  8. MAG-II reporter

    Labels both Filled and None -

    Lebel - Filled and None.png

    I guess what I need to figure out is how to clear the Filled on that specific transition. I'm just not sure which Post Function is able to clear a Label

  9. MAG-II reporter

    I believe I may have just found a solution to making sure the Label never shows Filled and None at the same time. This seems to work -

    Linked Issue Post Functions.png

    For the Groovy Expression in step 2 I simply wrote Null. Does this look like good practice?

    *Update - Looks like I can take out the Post Function #3.

  10. Fidel Castro Armario repo owner

    Hi @michaelgayheart,

    Post-function number 2 doesn't belong to JIRA Workflow Toolbox. You don't need to clean Labels field.

    To clean field Labels you can use Copy a parsed text to a field post-function with the following configuration:

    • Target field: Labels
    • Parsing mode: basic
    • Text be parsed: keep this field empty

    You don't have to write None in parameter Text to be parsed, simply keep it empty.

  11. MAG-II reporter

    Hi Fidel -

    That worked great! My JIRA project is really coming together, and I'm happy to say that many of the Post Functions utilized are from JWT. If there is any other kind of review I can write you on a website then I would be happy to do so. Thanks again!

  12. Log in to comment