Hi all,
I have a requirement in our project. The transition must set based on the comparison of two date fields and either it should be transioned to "X" status or "Y" status. Those comparison is being made between the "release date" in Fix Version/s and a custom date field. I added two post functions on the transiton which points itself again.
The case:
After the user clicks the transition button which points itself on the issue, an additional screen pops up and asks for a date on a custom field. By using "Transition issues by JWT" post function on a conditional execution
I supllied such information:
%{0074} > {01234} (First post function)
%{0074} < {01234} (second post function)
The problem arises no matter which date I choose on the pop-up screen, only it is being set for example into first post function statement not the second one.
Hi @denizkaradal ,
In order to use the actual release date, please use an expression like this (assuming an issue only has one fix version):
first(releaseDates(%{00074})) > {01234}
The field code itself that you have used only returns the version name.
Cheers
Thorsten
Hi @Thorsten Letschert _Decadis AG_
That made it work. As you pointed out, the issue might have more than one fix versions. How can I achieve to check them all then?
Regards
Deniz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @denizkaradal ,
Of couse you can check against multiple versions as well, e.g.
max(releaseDates(%{00074}))
returns the largest date and
min(releaseDates(%{00074}))
returns the lowest date.
Cheers
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thorsten Letschert _Decadis AG_
Thanks for the valuable feedback so far. As far as I am concerned, your suggestion brings only the maximum date or minumum date in this case. Am I right?
What I want to achieve in this case like this: If several "Releases" are listed under "Fixed Versions" on the issue, the date which I entered should be compared with all linked releases from released date.
i.e I have two released dates which are "30.05.2020" and "30.06.2020".
hope it is clear what I want to achieve now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @denizkaradal ,
Thanks for the feedback.
However, your solution should be there already then:
The expression
{01234} < min(releaseDates(%{00074}))
should transition to status x - if your custom date is lower than the lowest release date it's lower than all release dates.
The expression
{01234} > min(releaseDates(%{00074}))
should then transition to status y - if your custom date is larger than the lowest release date there is at least one release date lower than your custom date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Thorsten Letschert _Decadis AG_
Lastly which documentation should I take into account for a future reference in order to accomplish such case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @denizkaradal ,
The complete list of functions (extended by various examples) can be found here: https://apps.decadis.net/display/JWT/Expression+Parser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Thorsten Letschert _Decadis AG_
I realized a strange behaviour from a condition. As you know I have a transition which points itself along with those 2 post functions we set it up. So far so good.
I have another two transitions which point to either status "X" or status "Y". so I set on both two transitions "Hide a transition from user" function from "Conditions" tab. The idea was to let the user see only the transition button which brings that pop-up window.
but after applying those conditions, the post functions does not function anymore. Have any idea or is this a bug?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Thorsten Letschert _Decadis AG_
I found the solution by using "Transition is triggered by Jira Workflow Toolbox post-function" so problem has been solved. Only status name will not be updated automatically on view screen after post-function has been set. You need to refresh the page and it shows up the right one. Is there a solution for it or expected behaviour?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.