Closed oldunclez closed 1 year ago
I see several problems in your code:
@project = @issue.project
is a nonsensesytem 'echo...'
. Ruby has got different tools how to write into files.Try this:
project = self.project
if project
repository = project.repository
Rails.logger.info repository.url
end
Thank you ! Your code works.
In redmine , I have setup a repository for a project via https://github.com/linniksa/redmine_git_mirror The follow code works , it will find out the repository url of the project(id 1)
But I want to find out repository url of the current project , I have tried the following codes, none works
Workflow script executable before saving observable object contains error: Couldn't find Project without an ID
Workflow script executable before saving observable object contains error: undefined method
repository' for nil:NilClass`Workflow script executable before saving observable object contains error: Couldn't find Project with 'id'=0
Any help is appreciated, Thx!