Project

General

Profile

How can change settings for 'issue blank subject'?

Added by afshar m almost 9 years ago

Hi all,

I'm struggling to import some data from jira to redmine but I get error:

subject can't be blank

How can temporarily turn off this rule so I can import data from jira to redmine?

thanks.


Replies (2)

RE: How can change settings for 'issue blank subject'? - Added by Martin Denizet (redmine.org team member) almost 9 years ago

Hello,
What you are looking for is source:tags/3.1.1/app/models/issue.rb line 65:

-validates_presence_of :subject, :project, :tracker
+validates_presence_of :project, :tracker

However, if you do this hack, make sure that you fill these empty subjects using a SQL query for example.
That is because by doing so you corrupt the consistency of your data and I'm pretty sure it will end up in errors at some point.
Please note also that there might be a NOT NULL to override in the database.

Whatever you choose to do, I strongly advise you to backup beforehand!

Cheer,

RE: How can change settings for 'issue blank subject'? - Added by afshar m almost 9 years ago

Thank you very much. That's exactly what I was searching for.

I also have found another workaround myself. I was using following script for importing data from jira to redmine:

https://github.com/meltzow/jira2redmine

There were empty summaries (jira equivalent for subject) in my backup data. I added a tiny change in the script so in case of empty summaries a dumb text would be inserted. Find my enhanced script here:

https://github.com/afsharm/jira2redmine

    (1-2/2)