How to access numeric issue ids?

Issue #659 resolved
Christian Unbehend created an issue

Hi Fidel,

we want to use WF-Toolbox to replace another Addon which we used for issue create, link and copying values from creating issue to newly created linked issue. So we tried to use 'Create issues and subtasks' from WF Toolbox.

To identify, that a linked issue belongs to a particular issue tree we want to copy the numerical issue id ($issue.id in old Tool) into a field 'RootID' of the newly created issue as we did with the other AddOn.

We wanted to do the same with WF Toolbox but couldn't find how to access the numerical issue id.

Can You help us?

Regards Christian

Comments (11)

  1. Fidel Castro Armario repo owner

    Hi @cunbehen,

    JWT currently doesn't allow to access internal ID of issues, but it can be easily implemented in next version of the plugin.

    Anyway, I find strange that you need to access the internal ID of an issue. Can you, please, explain in detail what you mean by "...a linked issue belongs to a particular issue tree...". JWT provides very powerful features to check up linked issues. It's very possible that I can give you an alternative solution with the current features of the plugin.

  2. Christian Unbehend reporter

    Hi @fcarmario, we create links between issues in the same issue tree i.e. having the same root issue. We do this by using JWT-PF create Link with JQL-select of issues. There we use the RootID for matching to ensure the issue to be linked belongs to the same issue tree.

    By the way, when will the next version be released, which includes access to the issue id? I ask this, because we have a running production system with ten thousands of issues, which had to be migrated, if we switch to another solution than internal id based matching..

    Regards Christian

  3. Fidel Castro Armario repo owner

    @cunbehen,

    I don't find that supporting access to internal issue ID will be useful to most users, since you already have the issue key. Is it possible to use the issue key of the root issue, instead of the numerical ID?

    Can have a Skype video-conference in order to discuss this matter? I would like to see exactly why you need the numerical ID instead of the issue key.

    My Skype user is fidel100r.

  4. Christian Unbehend reporter

    Hi @fcarmario,

    of course, we can use the issue key. We know this. There is no need to discuss this further. The internal issue id more stable, e.g. when moving an issue, but that's not the main point.

    Most important: If we could access the internal issue id, as we can do with the actual tool, there would be no extra migration effort for then thousands of issues in the actual production system.

    Regards Christian

  5. Fidel Castro Armario repo owner

    @cunbehen,

    The way to support access to internal issue ID would be to create a new virtual field called "Issue internal ID", but I don't find justifiable to add new virtual fields to the already long list, when it will be used only by one user in a very particular case, having a solid alternative: issue key.

    Let me know if I can help you to do the migration.

  6. Fidel Castro Armario repo owner

    Hi @cunbehen,

    I have added support for this feature in version 2.2.39_beta_8 by including functions issueIDFromKey() and issueKeyFromID() in the parser. You can find a detailed explanation on how they work at parser's help.

    You can use these functions in your string expressions using advanced parsing mode.

    Please, let me know if you have any doubt about it.

  7. Christian Unbehend reporter

    Thank you very much Fidel,

    we have already tested a migration procedure to use issue keys instead of issue id, but i think, using the issue id as we do it actually now, will be much easier and faster to implement.

    We'll soon try version 2.2.39_beta_8 for it.

    Regards Christian

  8. Christian Unbehend reporter
    • changed status to open

    Hi Fidel, the field we want to set with 'issueIDFromKey(%{00015})' from the creating issue is a numeric one. Is there a type cast or sth. similar available to convert the text into a number directly in the parser?

    Regards Christian

  9. Fidel Castro Armario repo owner

    Hi c@unbehen,

    You can use the following math expression:

    toNumber(issueIDFromKey(%{00015}))
    
  10. Log in to comment