Get issuekey by issue id

Issue #557 resolved
Patrick Schuh [brainbits] created an issue

Hi Fidel,

I need to write issuelinks to an issue depending on a list of issue-IDs provided by an nFeed-customfield. Is their a way to transform a list of issue-ids to a list of issue keys that I can use to feed the create issue links post function?

Best regards Patrick

Comments (13)

  1. Fidel Castro Armario repo owner

    Hi Patrick,

    Can you please attach an example of the string value returned by nFeed custom field?

    You can use "Copy a parsed text to a field" post-function to obtain the value into a text field, or use New comment as target field.

  2. Patrick Schuh [brainbits] reporter

    Hi Fiede,

    10904, 10849, 10850

    This is the output. I guess these are issue-IDs.

  3. Fidel Castro Armario repo owner

    Patrick, I don't find any Issue picker custom field type in nFeed add-on. Which custom field type are you using?

  4. Patrick Schuh [brainbits] reporter

    Fidel, this is build with the origin nFeed- custom field. It stores the issue Ids in the following format:

    <content> <value>10298</value> <value>12655</value> </content>

    I parse this content, strip alle XML-stuff and write it to an emphemeral field like:

    10298, 12655

    Now I need a way to transform that issue ids into issuekeys to feed your create issue links post function with the value stored in the ephemeral field.

    Find attached as a screenshot the configuration of my nfeed field. But I guess that's not necessary to fix my problem, isn't it?24-03-_2017_14-00-18.png

  5. Fidel Castro Armario repo owner

    Hi Patrick,

    I have enriched function issueKeysToIssueList() in version 2.2.36_beta_1, so that it can get an issue list not only from issue keys, but also from strings containing issue ids.

    Please, try it and let me know if it solves your problem.

  6. Patrick Schuh [brainbits] reporter

    I Fedel,

    I'm not sure if I got it right: I have issue IDs (not Keys) as the source value, and want to transform them to Isse Keys.

    152437 > CAT-1234 162538 > CAT-1625

    Therefore I guess the function's name and description is not that suitable,m isn't it?

  7. Fidel Castro Armario repo owner

    This one is equivalent and much simpler an efficient:

    toString(issueKeysToIssueList(%{nnnnn}))
    
  8. Chau

    Fidel, this doesn't seem to work in v2.4.8 anymore? I have a nFeed field that has single selection and I try something like this to set the "Summary" but it give me empty value:

    Support.png

  9. Log in to comment