cairis-platform / cairis

Computer Aided Integration of Requirements and Information Security - Server
https://cairis.org
Apache License 2.0
148 stars 57 forks source link

Question: is it possible to change the type of Requirements? #664

Closed mehrdadasadiut closed 1 year ago

mehrdadasadiut commented 1 year ago

Expected behaviour

Changing the name of Requirements. We have some types of Requirements that are not listed in the current requirement types of CAIRIS. Which tables are needed to be modified and if it affect a running CAIRIS or not?

Version of CAIRIS

latest

Details of browser or, if applicable, details of the OS used to host CAIRIS

Firefox/Chrome - UBUNTU20.4

failys commented 1 year ago

If you really want to do this then there is a requirement_type table. The current types are inserted into the table in init.sql - just add rows for whatever types you want to support. However, the requirement types are also stipulated in the XML DTDs, e.g. cairis_model.dtd and goals.dtd, so you'll need to modify that too. You can't do this on a running server, so you'll want to export whatever you're working on, making the change, and restart the server and create a new database (i.e. to ensure init.sql runs)

failys commented 1 year ago

Come to think of it, you'll need to make a change to cairis-ui too, specifically Requirement.vue as the requirement types are coded locally there If you're going to do all this, you might be better off forking the cairis and cairis-ui repositories and working with those.

mehrdadasadiut commented 1 year ago

Sorry just to clarify, do I need to reinstall the CAIRIS from scratch? just stopping cairis and doing these changes will keep my current data or will it conflict and require reinstallation?

failys commented 1 year ago

You shouldn't re-install from scratch. If you do, you will overwrite any changes you make. Stopping CAIRIS, making the changes, and re-starting again should be sufficient. You will, however, want to export models you currently have running, so you don't lose anything when init.sql is re-run (which will drop and re-create all the tables).