Hello folks,
Is there any function in the jira api(5.2.11) mend for doing direct updates in the database?
like I have to update the PKEY in thd jiraissue table.
and some changes in changelog table
if yes then how?
Community moderators have prevented the ability to post new answers.
You cannot update directly like we update using a sql statement . You will need to update through the provided JIRA api. For example if you want to update the issue you will need o use the updateIssue() method
Hello mizan,
I want to update the pKey of the Issue.. but that function seems to be not working when i am updating the Pkey of the issue.
can you check with your excellience and tell me.
psudocode:
MutableIssue mIssue = (MutableIssue) event.getIssue();
mIssue.setProjectObject(newProjectObject);
mIssue.setPkey(newProjectObject.getKey());
ComponentAccessor.IssueManager.updateIssue(MyUser,mIssue,EventDispatcher,true)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can set the project for an issue but not the Project Key , project key is a fixed value and cannot be changed .
Do you want to change the project key for a partiular project ? or are you moving an issue to a different project ?
what are you trying to achieve ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://answers.atlassian.com/questions/163857/not-able-to-update-project-object-and-issue-key
see the above question.
i am trying to update issue key.
mIssue.setPkey(newProjectObject.getKey()); is actually
mIssue.setkey(newProjectObject.getKey());
that was by mistake
I am trying to change the issue key and project of my issue
reffer this.
https://answers.atlassian.com/questions/173760/update-function-not-working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As explained in several other places Sohil has posted this question, you cannot "edit" an issue when you want to change the project it belongs to, you have to "move" it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello Nic Brough Moving means creating new issue object and assigning it with the old values and deleting the old issue????
is this what you want to say??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You *can* access the database. It'd be hacky and not portable though. Just get the JNDI resource or direct JDBC access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you mean you *can* READ the database. Not write to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then this is not the answer you are looking for.
Harry's answer is correct, but only for reading the Jira database internally. You must not update the Jira database except via the internal API. It's no good using the internal database layer to update it, that will break, you must use the API. I can't emphasise this enough - issuing database insert, update or delete statements against any Jira table is likely to break it, and, if you absolutely must do it with SQL, you must have Jira offline, and if you've touched issue data, and possibly other things, re-index afterwards. (Ok, there's a handful of exceptions, but not many)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Nic i have done it using the data access layer of the jira not firing the actual sql queries but using OfBiz class. That surprisingly worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.