Why the lookup issues finds my fixVersions but still fails ?

Raphaël NORYNBERG
Contributor
November 4, 2024

Hello everyone,

 

So basically I'm trying to set the "Fix versions" field of many issues as the same value of their parent issue.

I guess it is possible through automation rules and the "Lookup issues" action, but I can't succeed to get it work.

I did that image.png

But when the rule ran the first time it showed me that error : 

 

"Custom Smart Value JQL Search: "fixVersions = Test auto raph" - Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'auto'. (line 1, character 20)"
I didn't get why it found the good value ("Test auto raph") but failed anyway, I thought it was maybe the spaces so I made a second try with another release name without space, and again it did find the good value but failed after : 

 

Custom Smart Value JQL Search: "fixVersions = test-version-sans-espace" - Field 'fixVersions' does not exist or you do not have permission to view it.

The first part of the rule doesn't seem relevant to me, but I share it just in case 

image.png

If anyone knows how I can get it work please help me !

 

Thanks in advance,

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2024

HI @Raphaël NORYNBERG 

For a question like this, please include an image of your complete rule and the audit log details showing the rule execution.  Those will provide context for the community to offer better suggestions.  Thanks!

Until we see those...

The Fix Versions field is a list of values, and so {{issue.fixVersions.name}} will produce a list when there are multiple values in the field.  Also, as version names could have spaces or special characters, try wrapping the value in quotation marks.  Finally with JQL, the field name is singular: "fixVersion".

Putting that all together, and assuming you only wanted to find the first value in the list, that could be this:

fixVersion = "{{issue.fixVersions.first.name}}"

 

Kind regards,
Bill

Raphaël NORYNBERG
Contributor
November 4, 2024

Hi @Bill Sheboy ,

Thanks for your reply,

I have modified "fixVersions = {{issue.fixVersions.name}}" into "fixVersion  = "{{issue.fixVersions.first.name}}"" but with there is no more lookup issues part in the log

So I got back the fixVersions but kept your "{{issue.fixVersions.first.name}}" and I have the same error as previously.

Please find audit log details below

image.png

The complete rule :

image.pngThanks for your help

Raphaël NORYNBERG
Contributor
November 4, 2024

With "fixVersion = "{{issue.fixVersions.name}}"", the rule ran with success except that it doesn't set the fix version field for the children (no erros in the logs)

Is this uncorrect ?

image.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2024

Lookup Issues can gather zero-to-many issues, matching the JQL provided.  As your rule image shows, it is trying to set the Fix Version to the key values in the lookup result, which will not work.

Please described what you are trying to accomplish, as your rule appears to have two purposes:

#1)

GIVEN an issue has linked issues
AND some of the linked issues are in the "To Be Prioritized" status
WHEN the trigger issue transitions to "To Dev"
THEN transition those linked issues to "To Dev"

#2)

GIVEN an issue has child issues
AND the issue has a value in Fix Version
WHEN the trigger issue transitions to "To Dev"
THEN copy the issue's Fix Version to the child issues

 

Raphaël NORYNBERG
Contributor
November 4, 2024

Indeed the two purposes you have mentioned are correct, and the first just works fine.

But for the second one it is not working the Fix version of the parent is not copied into the children.

Raphaël NORYNBERG
Contributor
November 5, 2024

Well this morning I thought again about my problem, and did some further research, and I finally realised that I didn't need to use ‘LookupIssues’ because in the ‘Edit Issue’ action there's the option to say that you want to copy the value from the parent, but it's not very intuitive for my taste, so I'm sharing the method here:

  1. In the "edit issue" action you select your field
  2. Then you click on the ‘...’ button next to the value field and select "COPY" : a line is automatically implemented
  3. From there you can click on the “copy from” button again to select the “Parents” value.

image.png

image.png

Thanks again @Bill Sheboy for your help !

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2024

Well done, researching and experimenting to find an answer!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events