Forums

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

What is going on in JIRA with archived versions when you edit an issue?

Mark January 23, 2019

## Given:

- two fields, the system "Fix Version/s" field and a custom Versions multi-select field called "Custom Version"

- scriptrunner behaviour script on each field:

    --> filters list of project versions to just unreleased versions, sets value list for the field

    --> reads current value of field and adds current value to value list for the field

The above works great. Only versions available to be added to either field are unreleased project versions. existing version values are allowed to remain.

For issues being edited with only unreleased and release versions in the fields, it works fine. When an archived version is a current field value, things get weird and we leave the tracks an enter the mystical JIRA forest. Please help me find my way.

On edit of an issue containing an archive version value set in these fields, JIRA presents what looks like another field in the form (which only exists in the edit window), and moves the archived version value to it (taking it out of the field it is actually in). 

For the "Fix Version/s" field:

- a "Archived Fix Version/s" field is presented in the issue edit view

- archive version value is not shown in "Fix Version/s" but is shown in "Archived Fix Version/s"

- scriptrunner getFieldById(getFieldChanged()).getValue() of "Fix Version/s" field DOES NOT return the archived version value

For the "Custom Version" field:

- a "Custom Version (archived)" field is presented in the issue edit view

- archive version value is not shown in "Custom Version"  but is shown in "Custom Version (archived)"

- scriptrunner  getFieldById(getFieldChanged()).getValue() of "Custom Version" field DOES return the archived version value

## Question:

- What is/how to find the name/id of the JIRA field "Archived Fix Version/s" which only appears in edit mode? I need to check/obtain the value from this field for the behavior script?

- Fortunately fetch of "Custom Version" does return the archived value even though that field doesn't display that value in edit mode. I can let this inconstancy go as it works with a workaround (user editing issue has to re-select it or it gets removed on save).

Mark

 

0 answers

Suggest an answer

Log in or Sign up to answer