Forums

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

Proper way to edit an issue in java?

ryan McCullough March 14, 2012

As a "Newby" to jira developent, what is the proper way to edit a custom field for an issue in java?

1 answer

1 vote
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.
March 14, 2012

Depends on where you are doing the "edit". Assuming you're working in a plugin of some sort, the process you are doing the edit in is likely to give you an issue object (in fact, a mutableissue object), and you'll need to update the fields in that.

Some gotchas though

  1. Depending on the process you're going through, you may need to trigger a re-index of the issue (e.g. post-functions you won't need to think about it for the issue the user was working on, but you will need to index any other isssues you've amended, like subtasks or linked issues)
  2. Status is NOT a field. It is an indication of where you are in the workflow. Don't ever bother trying to set a status, use a "transition workflow" action, which will handle all the horrid bits for you. Moving issues is similar.
  3. Create issue is a different beastie to amending existing ones.

There's probably a lot more people could volunteer for you, but you really need to give us a lot more information on what you'd like to have your work do, and where it's running, and so-on.

ryan McCullough March 14, 2012

I need to look-up a series of issues by key, and edit 2 custom text fields. the fields are otherwise read-only to the user, and cannot be modified in any other way.

Suggest an answer

Log in or Sign up to answer