Concatenate value from linked issue with custom value

Issue #416 resolved
Erwin Ilgun created an issue

Hi Fidel,

I'm stuck in executing the following task:

Situation - We have two dev-projects and one service desk - The service desk agents populate the component with a value to distinguish between incoming tickets - The service desk adds a fixVersion with a prefix in order to distinguish between releases for both projects (woe is JIRA for a lack of better version management)

What I Want Upon transitioning a ticket in our Service Desk I want it to update the fixVersion with the correct prefix (based on the component) and the fixVersion in the linked issue from the dev-project

I tried to accomplish this with the use of an ephemeral field for the prefix (or a custom field for that matter), but I can't figure out how to combine this value with a value from a linked issue.

I also know we could add the prefix to the fixVersion in our dev-projects and then copy the field value, but understanding this use of this post-function could open up a lot of possibilities.

Comments (10)

  1. Fidel Castro Armario repo owner

    Hi Erwing,

    I have some questions:

    1. How many components do you have in the Service Desk project?
    2. Is the version already created on the Service Desk project? JIRA Workflow Toolbox can set Fixed versions and Affected versions fields, but can't create new versions in a project.
    3. Please, describe the relation between issues in Service Desk and Dev projects: issue link type, issue types, issues statuses, project keys (in case they are fixed), or whatever.
  2. Erwin Ilgun reporter
    • we have 5 components in our SD project, two of them correspond with two different DEV projects.
    • the version is not created yet, but we can add these in advance so this is not a problem
    • we use the 'is addressed by' link exclusively to link SD issues with DEV-issues.
    • we have the 'Problem' issue type in SD and the 'bug' issuetype in DEV
    • Once the issue in DEV transitions from 'ready to merge' to 'acceptance test' we know what the fixed version will be (mandatory field in dev). This is the moment we want our SD ticket to be updated with the fixed version.
  3. Fidel Castro Armario repo owner

    Erwin, in the description of the issue you say:

    Upon transitioning a ticket in our Service Desk I want it to update the fixVersion...

    but in your last post you say:

    Once the issue in DEV transitions from 'ready to merge' to 'acceptance test'.... This is the moment we want our SD ticket to be updated with the fixed version.

    It seems contradictory to me. Do you want the post-function that updates Fixed Versions in SD issue to be executed in DEV workflow, or in SD workflow?

  4. Erwin Ilgun reporter

    Hi Fidel,

    I want the post-function in the DEV workflow and update the FixVersion in the SD project (if possible, if not we could also trigger a transition in SD and have the post-function there). I've added a picture to clarify the situation. IMG_20160928_150007_2.jpg

  5. Fidel Castro Armario repo owner

    Sorry Erwin, I have some other questions:

    1) You said: "We have 5 components in our SD project, two of them correspond with two different DEV projects.". That affirmation makes me think that we can use the project the SD issue belongs to for determining the prefix, instead of the component in the SD project. Am I wrong?

    2) Are both DEV projects sharing the same workflow?

  6. Erwin Ilgun reporter

    Hi Fidel,

    You don't have to apologize, I'm the one bothering you

    Indeed, we have Components A, B, C, D and E. If component A is selected, then the prefix should be DEV1-2.1 If component B is selected, then the prefix should be DEV2-2.n The other components are used by our SD to measure issues solved without code changes. In my view we need the component to determine the prefix and the fixVersion from the linked issue in the DEV1/DEV2 project.

    I'm responsible for DEV1, DEV2 uses its own workflow but I can have them adjust it accordingly to support a solution to this problem.

  7. Fidel Castro Armario repo owner

    Ok, thanks. Then you have to add "Write field on linked issues or subtasks" post-function in transition from "Ready to merge" to "Acceptance test" statuses in DEV workflow using the following configuration:

    conf-0.png conf-1.png conf-2.png conf-3.png conf-4.png conf-5.png

    Source value is:

    getMatchingValue(^%{00094}, ["A", "B"], ["DEV1-", "DEV2-"]) + %{00074} 
    

    and parameter "Filtering by field values" is:

    ^%{00094} in ["A", "B"] 
    

    Note that:

    • %{00094} is field code for Components
    • %{00074} is field code for Fixed versions
    • Prefix ^ before a field code means that we are referencing the value of the field in linked issue.
    • "A" and "B" are the names of 2 components.
    • I'm assuming that there is only 1 Fixed version selected in DEV issue, and 1 Component selected in SD issue.
  8. Log in to comment