Adding new column into database

akunnari January 28, 2021

Hello,

 

I would like to add a new column (a boolean) into the jiraaction table. Is there any problem with doing so?

I am trying to mark certain comments ahead of extraction as relevant and giving them a flag seems to be the only way... Atleast I haven't found any addons that can do this.

 

I know the general opinion is to not touch the databases directly, but I just want to know, if adding addiotional data can break something.

 

Best regards

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2021

Do not do this.

You will not be able to upgrade unless you change the code such that it knows how to account for your column, and you will need to make significant changes to the core code in order to use the column.  As you go to investigate that, you'll find the code to do it is nowhere near as simple as you are guessing it might be.  Any of those changes render you totally unsupported (and unable to move to Cloud or DC when server goes away in 2024)

Do it properly, write an app that stores and uses the data in active objects.

akunnari January 29, 2021

Well, I'm not sure my boss will even want to change to cloud like... EVER. So atm its not a concern of mine. Why and how would I have to adjust the code though?

 

Can't i just use a standard sql command to add a column to the table and not bother about it anywhere in the software itself?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2021

No you absolutely can not "just add a column", you will break it completely. 

Please also have a look at the rest of my answer, it's not just breaking the move to Cloud or DC you need to worry about.

akunnari January 29, 2021

I guess some iteration errors might occure when a table is suddenly longer than it is supposed to, but what ever, it would have been way too easy anyways...

Just hypotethically, what about ADDING a completely new table? I could just do it on a separate database, but it would be a waste of space, to have to copy the jiraactions table on a regular basis.

 

 

To your suggestion regarding writing an app:

I'm having trouble figuring out, how to create my own applications. The only thing I find is the Atlassian SDK:

https://developer.atlassian.com/server/framework/atlassian-sdk/configuring-the-plugin-descriptor/

It seems to be made for Jira, is it also the way to go, when creating Service Desk applications?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2021

That's only one error that can occur, there's loads of others.

Yes, it is safer to add a new table that has nothing to do with Jira, but you are now making a rod for your own back - you'll have to code a complete access layer for it, embedded in Jira's core, or including all the access layers in an app, not just piggybacking Jira's layer.

You will still render your system unsupported, non upgradable, and non migratable.

For getting started on writing an app, I usually point our new coders at https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events