Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find specific related issue using Groovy scripting in Post Function

Vivienne Barrett
November 11, 2020

Hi there, 

I need to set a specific value on a custom field within some linked issues but not all of them. 

I'm using the 'Set field value of related issues (JMWE app)' Post Function and am using the 'Issues Returned by the following Groovy script' option to find the specific related issues that I require updated. 

From the research I've carried out to date the following syntax returns a list of all of the related issues 

issue.getLinkedIssues()

And these are the results:

Result type:
ArrayList
Result value:
[Test-250, Test-249]

So this gives me all the related links which is great but I need to break that down further and only have the 'Result Value = Test-249' and not just list all of the related issues. 

Is this doable? Does anyone have the correct syntax to use in this scenario? 

Any help appreciated... 

Thanks

 

1 answer

1 accepted

0 votes
Answer accepted
pschaff01
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 Champions.
January 17, 2013

Hi Dominic

To fix this, you'll have to do the following:

  1. Log in to JIRA as an Administrator;
  2. Browse through Administration -> System -> General Configuration -> Advanced;
  3. On the jira.date.picker.java.formatfield you have the following info configured:
    yyyy/MM/dd
    
  4. Change this format to the following:
    yy/MM/dd
    
  5. This will solve your problem with the date format and the new issues created will appear normal ("/13" will be "2013").
  6. If the problem persists with the existent issues just click on "Edit" on the issue and insert the "Due Date" field again.

I hope this helps. ;)

Cheers

onkeldom
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 Champions.
January 30, 2013

Thanks Pietro,

I already tried that setting before. Sadly changing the date picker fields in that way screws up the excel export options. The system date fields get exported in a different way than the custom date fields ... so I switched back.

Atlassian should just implement a check routine to forbid inputs different from the configured date formats. But I guess that never happens. Thanks anyway ...

Cheers,

Dom

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events