Forums

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

Updating issue using CSV file - issue key?

Dan Brewerton September 25, 2020

I was curious, what is considered the issue key when performing updates? Can the issue key be any Jira field? We have one field that is unique - based on the record ID of another system. Can I make our configured field called "QB" the issue key?

2 answers

2 accepted

2 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2020

the issuekey as it is commonly referred to is the actual number of the issue - project-#, e.g. ACE-123

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
September 25, 2020

No, the issue key in Jira is the only thing Jira uses to uniquely identify an issue (well, there's also the id, but that's in the database, and not exposed to us humans much).

So updates have to refer to the current issue key in order to uniquely identify the issue.

You could do it with another field, but you would have to search for issues on that field, read the (hopefully single) issue out and get the issue key to then use in your update.

Dan Brewerton October 26, 2020

I found this article as a how-to on Bob Swift Tech. 

https://bobswift.atlassian.net/wiki/spaces/SUPPORT/pages/274333867/How+to+use+runFromCsv

They mention using a runFromCsv application, I presume it is CLI. In my case, I have a custom field called QBID which is unique. I'm updating a custom field called label. Can anyone give me a hint on how to configure the command to do this? In their example they show:

Action

jira --action runFromCsv --common "--action setFieldValue --field custom1" --file cf.csv --propertyFile import.properties

cf.csv

Key, "My custom1 value"
ZCLI-1, xxxx
ZCLI-2, yyyy

import.properties

# Map field headings to parameters understood by the JIRA CLI
# - key values (left hand side) must not contain blanks, blanks can be escaped (with \) if needed
# - the first character of field names will be automatically lowercased (except for custom fields)
# - field headings with embedded blanks are ignored unless they are mapped
# - field heading that should be ignored should be mapped to blank
# - custom fields can either be specified by name, id (like customfield_10120), or id (like 10120)
# - value mappings can also be done, they are specific to the (mapped) field name

field.Key = issue
field.My\ custom1\ value = values

Output

Run: --action setFieldValue --field custom1 --values "xxxx" --issue "ZCLI-1"
Issue ZCLI-1 updated.
Run: --action setFieldValue --field custom1 --values "yyyy" --issue "ZCLI-2"
Issue ZCLI-2 updated.
Run completed successfully. 2 actions were successful from file: /development/attachments/cli/files/cf.csv
Dan Brewerton October 26, 2020

So, perhaps the syntax in my situation would be:

jira --action runFromCsv --common "--action setFieldValue --field label" --file cf.csv --propertyFile import.properties

Then in the import.properties file I set the qbid field as the key field??? 

Nic Brough -Adaptavist-
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.
October 26, 2020

You will need to map your QBID field back to the issue it is on first, so you can put that in the Key column.

Suggest an answer

Log in or Sign up to answer