digitalfondue / lavagna

Lavagna: issue tracker/project management tool
http://lavagna.io
GNU General Public License v3.0
636 stars 110 forks source link

Card label list + string #140

Open zgelp opened 4 years ago

zgelp commented 4 years ago

Hello, I am trying to implement List + string feature on the Label side of Lavagna so when you choose label, it gives you option to also input a string, and it all shows up as List label name : Value from list : String from input on the card when it is submitted.

What is the best approach to start this one ? I can see that database is very well designed, I tired changing the value of INT from Label added to card and access it through API but i get SQL PROCEDURE lavagna.RAISE_CHECK_ERROR. Can you guys please point me where should I start with this one ?

Thanks for help and advice.

syjer commented 4 years ago

hi @zgelp , first, you need to declare a new value in the LabelType enum.

Then you need to create a new sql migration file to drop and recreate the constraint: EVENT_LABEL_TYPE_VALUE, CARD_LABEL_TYPE_VALUE , CARD_LABEL_VALUE_TYPE_VALUE and CARD_LABEL_VALUE_ENSURE_TYPE (in the case of pgsql/hsql) and the LA_FUN_CARD_LABEL_ENFORCE and LA_FUN_CARD_LABEL_VALUE_ENFORCE functions for mysql with the new enum value.

Then I think it should be quite linear.

Edit: but you will need to modify quite a bit of code, unfortunately. I'm wondering if dropping some part of the constraint would be better.