Problem cloning main issues with their associated subtasks

Issue #103 resolved
Paul DiNunzio created an issue

Hi Fidel,

We are having a problem with subtasks getting created when cloning main issues. I think I know the root cause, but I'm looking for a potential better solution to what I'm trying to accomplish. Please see the attached pdf file for details and my question. This issue has put me into a catch 22 situation. Any help would be appreciated.

Comments (11)

  1. Fidel Castro Armario repo owner

    Hi Paul,

    You should be able to do it by replacing your current validator with "Boolean validator with math, date-time or text-string terms" using the following configuration:

    conf-1.png

    Boolean expression used is: %{13000}=null OR isInRole(%{13000}, "Business Owner") OR isInRole(%{13000}, "Workgroup") OR isInRole(%{13000}, "Managers")

    Notice that %{13000} is the field code for "Assign To Sub-Task" in the particular JIRA instance I used for this example.

    Once configured, transition "Create Issue" will look like this:

    conf-2.png

    Please, confirm that this solution works correctly for you.

    By the way, I advise you to update your version of the plugin to most recent version (2.1.26), since it provides many improvements and bug fixes to your currently installed version.

  2. Fidel Castro Armario repo owner

    A much more simpler solution: uncheck parameter "Field must be initialized:" in your current validator.

  3. Paul DiNunzio reporter

    Hi Fidel,

    I did try your first suggestion above and it appears to have solved my problem. I also tried your second suggestion before trying the first and found that cloning "Closed" tickets with "Closed" subtasks was not working (i.e. the subtasks were not getting cloned). I'm not sure why, but it doesn't seem to matter at this point. Thanks very much for your prompt reply to my issue!!! I believe this issue can be closed at this point.

  4. Paul DiNunzio reporter
    • changed status to open

    Hi Fidel,

    I re-opened this issue in hopes that maybe you would have a suggestion for a slightly different problem regarding the ability to clone a subtask now that I have validators in place. It works fine when I clone a parent with subtasks, but I run into the JRA-29704 bug where the subtask gets linked to itself when I try to clone just a subtask. I can live with this issue, but thought I would ask if you had any suggestions for making this work?

    Thanks again for your prompt responses.

    -Paul

  5. Fidel Castro Armario repo owner

    Paul, do you know why subtask clonation is failing? Is there any difference in the workflow from parent's issue?

    According to my information, I don't see why they are behaving differently from parent issues.

  6. Paul DiNunzio reporter

    Hi Fidel,

    Yes, my subtask workflow is quite different from my parent ticket workflows; however, your question prompted me to look closer, and I quickly identified that my subtask workflow did not have the “Creates the issue originally” postfunction in the 1st position. I had a postfunction that was setting up a field value in the 1st position. Once I reversed the order, my problem seems to now be resolved.

    I think I’m good now.

    Thanks,

    Paul J. DiNunzio Manager, Configuration Management Penn Mutual Life Insurance Company Office: (215)956-8742 Cell: (484)653-9648 Email: DiNunzio.Paul@pennmutual.com

  7. Fidel Castro Armario repo owner

    Version 2.1.27 has just been released, adding isAClone() function to the parser. This new function can be used for checking whether current issue is being created by JIRA cloning operation.

    Using this new function we can make a more general and correct solution for your problem. Just use "Boolean validator with math, date-time or text-string terms" with the following boolean expression: isAClone() OR isInRole(%{13000}, "Business Owner") OR isInRole(%{13000}, "Workgroup") OR isInRole(%{13000}, "Managers")

  8. Paul DiNunzio reporter

    Hi Fidel,

    We use your Tools plugin pretty extensively here and we are on your 2.1.22 version. Is it possible that upgrading to your latest 2.1.27 release will break any of our existing configuration set up using your plugin ? Just want to be sure before upgrading.

    Thanks,

    Paul J. DiNunzio Manager, Configuration Management Penn Mutual Life Insurance Company Office: (215)956-8742 Cell: (484)653-9648 Email: DiNunzio.Paul@pennmutual.com

  9. Fidel Castro Armario repo owner

    Hi Paul,

    Upgrading to a newer version of JIRA Workflow Toolbox never breaks your current configurations in your workflows. Newer versions of the plugin always provides backwards compatibility with older versions of the plugin.

    Regards,

    Fidel

  10. Log in to comment