Write field to linked issues (execute delayed transition) is not working

Issue #348 resolved
Charles Szmagara created an issue

Hi,

I am having issues closing linked issues on transition (post function). I am using: "Write field on linked issues or subtasks" post function

post on cancel.PNG

Above are the post functions. "Discard" is the transition that is supposed to resolve the issue. I can see that workflow toolbox is actually running it, but then nothing happens.

I have got debug logs, I can send it to you. I have installed the latest version 2.2.12 - no difference. I have uninstalled and then installed the add-on again - no difference.

In another workflow I had a post function that was creating a comment to a linked issue - that worked. But executing a transition nor writing to a status field is not working. Is there a trick to make a linked issue transition to another status?

Comments (19)

  1. Fidel Castro Armario repo owner

    Hi Charles,

    Please, send the log file to support@workflowarts.com.

    I also need to see conditions and validations tabs of the "Discard" transition in linked issue's and subtask's workflows. Please, attach screenshots.

  2. Charles Szmagara reporter

    Hi Fidel,

    Validations are empty. Conditions of Discard transition: MOP conditions.PNG

    Additionally please see the workflow of issue type MOP and post functions of transition Discard: MOP workflow.PNG MOP post functions.PNG

    Please note that I am the reporter and Administrator, so conditions are met.

  3. Fidel Castro Armario repo owner

    Charles, please, try moving "Write field on linked issues or subtasks" post function before "Fire a Generic Event event...", and preferably move it to first position in execution order.

    The user who is executing the transition where post-function is, should also fulfill the conditions of "Discard" transition, i.e., he should be an Administrator, or the Reporter or play Managers role in linked issues and subtasks.

  4. Charles Szmagara reporter

    It's working! :)

    Moved "Write field on linked issues or subtasks" to first position in execution order. Do I always have to have it as first? What stops executing it when it's not first?

  5. Charles Szmagara reporter

    Hmmm... another workflow fails... and I don't know why! SDM post functions.PNG The second post-function that makes a comment works! But the first one doesn't. I even removed the second post-function thinking two might not run at the same time, but it doesn't work. The abolish transition on configuration request has no conditions, no validations. Please help, what am I doing wrong?

  6. Fidel Castro Armario repo owner

    Virtual fields "Issue status (delayed writing)" and "Transition issue (delayed transition)" do their job after event in current issue is executed, but if event occurs before writing on those fields, the job keep sleep waiting for an event has already happened. So, actually, you should execute those post-functions before the "Fire event..." post-function.

  7. Fidel Castro Armario repo owner

    Can you please attach a screenshot with post-function's tab of "Abolish" transition?

    Are you sure that "contains" linked issues are in a status where transition "Abolish" is available?

  8. Charles Szmagara reporter

    CR post functions.PNG Yes, I am sure that "contains" linked issues are in a status allowing for abolish transition.

  9. Fidel Castro Armario repo owner

    Please, try replacing source value in first post-function of "Cancel" transition (currently Abolish) with the following value:

    Abolish : {delay=1000}
    

    if it doesn't solve the problem try this:

    Abolish : {delay=2000}
    

    This way we are setting a delay of 1 s or 2 s for execution of transition Abolish, instead of the default delay of 0.5 s.

  10. Charles Szmagara reporter

    it's not working :( why is this transition not working I wonder... The first one looks for sub-task... and executes the transition - this works fine. This one looks for a link "contains"... adding comments to issues linked by "contains" works, but moving status (executing transition) doesn't.

  11. Fidel Castro Armario repo owner

    Please, do the following:

    1. Set logging level for package com.fca.jira.plugins.workflowToolbox to DEBUG. You can do it at Administration > Logging and profiling > Configure logging level for another package.

    2. Reproduce the problem.

    3. Send me your server's log file.

  12. Fidel Castro Armario repo owner

    Charles,

    I expected a much more verbose output in the log file. Did you removed 2º post-function (the one for creating a comment) from Cancel transition?

    Please, try disabling post-function 1 in Abolish transition, simply by setting parameter Conditional execution with the following boolean expression:

    false
    

    Let me know whether with this modification transition Abolish is executed.

  13. Charles Szmagara reporter

    Yes, I have removed the second post-function that was creating comments as it was working. SDM post functions2.PNG As above, what's the purpose of this exercise? We just disabled this post-function.

  14. Fidel Castro Armario repo owner

    I meant to disable post-function 1 in transition "Abolish" (the one that executes transition "Discard"), but you did it in transition "Cancel".

    Once you have done the modifications, please, execute transition "Cancel", and after that check up whether transition "Abolish" has been executed.

  15. Charles Szmagara reporter

    So I made the changes... SDM ticket transition Cancel was run by user. SDM ticket got cancelled, but NET ticket that is linked to SDM did not get cancelled. The transition abolish on SDM ticket was disabled as per your recommendation.

  16. Fidel Castro Armario repo owner

    Hi Carles, can we have a screen-share by Skype? My Skype user is fidel100r. I will be available since now to 11:15 UTC. I would like to have the meeting ASAP. Thanks.

  17. Fidel Castro Armario repo owner

    The problem was that the configuration of the post-funcion was wrong, since a wrong issue link type was selected.

  18. Log in to comment