latestUnreleasedVersion() does not return anything to the function

Issue #656 resolved
Erwin Ilgun created an issue

Hi Fidel,

I'm trying to update the affected version on an issue based on a certain component using the post-function 'Set a field as a function of other fields Function'. See the example.

When I use this expression, the version is updated accordingly (component)v-2.1

When I try to get the latestReleasedVersion in my project(PRO) the field stays empty. Any ideas how to tackle this?

The versions list is populated with released versions.

Kind Regards,

Erwin

Comments (14)

  1. Fidel Castro Armario repo owner

    Hi @erwini,

    Use the following setting rule:

    a(component)latestReleasedVersion("PRO")
    

    Note that we use prefix a in order to force the setting rule's value part to be parsed in advanced parsing mode, otherwise latestReleasedVersion("PRO") is considered the name of a version, and not processed as a parser's function.

  2. Fidel Castro Armario repo owner

    The stack trace you presented doesn't correspond to version 2.2.38. Which version of JIRA Workflow Toolbox are you actually using?

  3. Fidel Castro Armario repo owner

    There is a bug in the plugin that makes function latestReleasedVersion() fail when there are versions released without release date. Please, revise your versions, and check whether there are released versions without a release date.

    Next version of the plugin will fix this problem. If you need it, I can provide a beta version fixing the problem.

  4. Erwin Ilgun reporter

    Thanks, we had some archived versions without a release date. I get the desired result now. Keep up the good work!

    Kind regards,

    Erwin

  5. Gowri Kumar

    There seems to be a similar problem with earliestUnreleasedVersion()

    When I use latestReleasedVersion(), the fix version field is updated, but not when i use earliestUnreleasedVersion() I am using version 2.2.42

    Thanks, Gowri

  6. Fidel Castro Armario repo owner

    Hi @gowrik,

    I can't reproduce any problem in relation with function earliestUnreleasedVersion().

    Can you, please, attach the error message (stack trace) in your log file, or describe in more detail the conditions to reproduce the problem you are experiencing?

  7. Gowri Kumar

    Hi @fcarmario ,

    Unfortunately, I do not have access to logs.

    But, I can give you the steps used to reproduce the issue:

    I am adding a Post-Function in a JIRA workflow:

    1. When I use a version string, "1.2.3.4", the issue Fix Version field gets updated successfully. VersionString.JPG

    2. When I use latestReleasedVersion(), the issue Fix Version field gets updated successfully to the correct value. latestReleasedVersion.JPG

    3. But, when I use earliestUnreleasedVersion(), the issue Fix Version is still blank and doesn't get updated. earliestunreleasedversion.JPG

  8. Fidel Castro Armario repo owner

    Hi @gowrik,

    I have tested a similar configuration as yours on JIRA 7.5.0 with JWT 7.2.42 and it works as expected.

    Expected behavior is that Fixed versions will be set with the unreleased versions with the earliest release date among all unreleased versions in the project. In case all unreleased versions in the project have field Release date unset, function earliestUnreleasedVersion() will return nothing, and thus Fixed versions will keep unset.

  9. Gowri Kumar

    Hi @fcarmario

    I have only 2 versions that do not have Release Date set. All the other versions are either Released or Released and Archived.

    ReleaseVersions.JPG

  10. Fidel Castro Armario repo owner
    • changed status to open

    Please, try version 2.2.43_beta_2, and let me know whether it solves your problem.

    Currently function earliestUnreleasedVersion() compare versions only by Release date. This new version also compares by Start date when Release date are equal.

  11. Log in to comment