How works updating the allowed options on a multiple value field?

Manfred Prandini July 7, 2021

Hi,
we have an automated process for synchronizing data and version information with a supplier.
The CSV export and import I was able to automate with the PowerShell JiraPS module, great stuff by the way.
Now we have 2 fields (Requested and Affected versions) which have multiple allowed values in it. I need to update those values and I do not have a clue on how to do it.
At least with the following commands I see a list with this allowed values:


$FieldProjectData = Get-JiraIssueCreateMetadata -Project "ProjectKey" -IssueType "IssueTypeName" -Credential $Credentials
# Affected Version number 4 in this list is one of the fields!
$FieldProjectData[4]AllowedValues

But in the end I see details for every field:
self : https://blabla.com/rest/api/2/customFieldOption/blabla
value : MyValue
id : blabla
disabled : False

But how can I add a new allowed Option to this Custom field? There seems to be a link for every allowed option and I really dont get it? Any help would be great because I am completely stuck here.

If anyone had such and update and can provide a working example this would be great. I mean also every allowed value seems to have an id and I believe this ID keys should not be messed around with, but like I said I dont get it and usually I always find a solution.

Thank you and kind regards
Manfred

1 answer

1 accepted

1 vote
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2021

Hi Manfred - Welcome to the Atlassian Community!

Not sure that I completely follow you - what type of fields are these? 

Can you go to Settings > Issues > Custom Fields and find the fields there? 

Manfred Prandini July 7, 2021

Hi John,

thank you for the welcome! I only see projects - Project name - Project Settings - Fields and there I see those 2 fields.

I am missing here the complete point how this allowed options are added to this customfields. For my understanding each allowed option is somewhere saved, as on a property for this option there is always a link. Now how are those options:

1) Added to a project,

2) Related to the custom field

3) I need to be sure not to mess around with the key per option.

Sorry I am not good in explaining. As this should be an automated interface to and with a supplier I am not able to automate this part.

The overall process should be the following:

1) Export issues with a supplier sync flag set to a csv (JiraPS module done)

2) Synchronise suppliers SFTP with our exported information and attachments, do not overwrite anything on supplier side, except for the issue export file. (WinSCP and PowerShell done)

3) The sync gives back 2 lists 1 should update the allowed options on 2 custom fields which are visible from the gui as dropdown selections. The already existing allowed options need to stay as they are so that the keys stay the same. (Thats the part I am stuck)

4) The second supplier file give some feedback on the issues via comment and sets some flags (JiraPS module done)

Maybe another point to explain we have lets call this field Software Version, in this customfield there are several allowed options:

Version 1

Version 2

2.01

etc..

This versions as the supplier is developing are increasing with new version numbers. This I should be able to update the allowed options with the new versions.

Thank you and kind regards

Manfred

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2021

Click on the gear icon in the top navigation bar on the right side. That's the Settings icon.

Then select Issues.

Then select Custom fields. 

Suggest an answer

Log in or Sign up to answer