So after I few months I finally had time to finish and release Easy sign ups!
Basically the whole thing was laying on the disk almost done for weeks. But didn't have the time and mood to finish it. To be honest for most of the time I was juggling between moving forward with the project or killing it.
Luckily the sales of OpenID Authentication for JIRA were recently going up. As those two share most of the code it give me a spark to finish the product. Also I was contacted by a few people interested in using the plugin with ServiceDesk.
I have already a few downloads from people interested in the plugin and I haven't started marketing it yet. I plan to contact all the previous customers and let them know about the plugin.
I silently expect this plugin to beat OpenID for JIRA at least two-folds. Will see if my guesses were right in a year.
Now I'm playing again with Zen. Thinking about killing the idea too and using this time for something more productive.
Before I make any decision I plan to play with PostgREST more - I need to figure out how it handles security. I know it does but I haven't figured it out yet if that's something I could use.
It's not the first time the company didn't know what to do with its free offering. Once upon a time I worked on Atlassian Connectors for Eclipse and we were struggling to move the product forward. Finally after years it was killed.
If you have a product like JIRA which brings a lot of money and a companion app that is free guess where all the effort will go? We had some good ideas back then - like moving code reviews into IDE. That could have been a great feature but was complex to implement and cost us a lot of time to support (as Eclipse didn't have any nice API and we used a lot of hacks). So the product was castrated at some point to make it simpler to maintain.
At the same time ALM works were working on their JIRA client and after the years Connector is gone and they are still around as they had an incentive to build a product that people want, give them good support and move it forward. As they got paid to do it.
It's not that Atlassian is bad at free software to be honest. I think there's no point in doing free software in the first place. Money is a great indicator of people's interest. If they give you money they find the software useful.
And you don't want to make a useless software, don't you?
Stealing good ideas is a good idea. So loving the fact that every JIRA issue has a nice key I want to have exactly the same in Zen.
I'm using PostgREST as a backend for now. That's an easy way to write to the database without writing any code. But at the same time that's a stupid way to write to the database because you cannot add any custom code.
Without any other place to write the code that forces me to use the power of the database (or PostgreSQL in this case). Fixing this requires only two triggers:
classCreateProjectNoRule<ActiveRecord::Migrationdefchangeexecute<<-SQL CREATE OR REPLACE FUNCTION projects_insert_row() RETURNS TRIGGER AS $sql$ DECLARE sequence_name text; create_sequence text; BEGIN IF NEW.seq IS NULL THEN sequence_name := 'project_no_' || (SELECT nextval('projects_no')); create_sequence := 'CREATE SEQUENCE IF NOT EXISTS ' || quote_ident(sequence_name) || ' START WITH 1 OWNED BY projects.seq'; EXECUTE create_sequence; NEW.seq := sequence_name; END IF; RETURN NEW; END; $sql$ LANGUAGE plpgsql; CREATE TRIGGER projects_insert BEFORE INSERT ON projects FOR EACH ROW EXECUTE PROCEDURE projects_insert_row(); SQLendend
classCreateIssueNoRule<ActiveRecord::Migrationdefchangeexecute<<-SQL CREATE OR REPLACE FUNCTION issues_insert_row() RETURNS TRIGGER AS $sql$ DECLARE sequence_name text; BEGIN IF NEW.no IS NULL THEN sequence_name := (SELECT seq FROM projects WHERE id=NEW.project_id); NEW.no := (SELECT nextval(sequence_name)); END IF; RETURN NEW; END; $sql$ LANGUAGE plpgsql; CREATE TRIGGER issues_insert BEFORE INSERT ON issues FOR EACH ROW EXECUTE PROCEDURE issues_insert_row(); SQLendend
This it the power of using the database to its full potential. Cannot wait to introduce more advanced concepts :-)
And yes, this means that I'm tying Zen to PostgreSQL forever. I can live with that.
But wait, aren't those migrations written with Active Record Migrations? They are, but I'm using an awesome gem standalone migrations to run them without Rails project.