-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a Note from time entry comment works on Edit Issue, not on Time Log #301
Comments
I think that you must use the journal: issue.init_journal(User.current, 'Your notes') |
I put on before saving observable object if comments.present? But I'm afraid it does nothing, neither on edit link nor Log Time link. Any idea? This is my environment: Environment: |
I tried also to put only your sugestion: |
From where do you take the object issue? Post your complete code. |
Then it should be: self.issue.init_journal(User.current, 'Your notes') |
Thanks Picman but I've tried
and it saves workflow without errors but it does nothing on time from edit link of an issue nor from Log Time link. |
if comments.present?
self.issue.init_journal(User.current, comments)
self.issue.save!
end works for me. |
Your code:
works on Log Time Link but not on Edit link on an issue. My first code:
is the opposite, works on Edit Link but not on Log Time Link on an issue. Any idea? If not, is there any way of know in which of the links is executing the workflow to put both code? |
I'm having the same problem... any idea? I am using this code on an time_entry before saving script:
The idea is to save a journal when a time is logged/edited.
The problem is when the user wants to log a time_entry using the edit issue screen... when that happens, no journal is added, even tho the the time_entry is. I tried this exception to check if the before_save script is being called when the user does that...
And the error shows that the variable nota has the correct value... the journal is just not added. Is there a way to fix this?
|
I need to save as issue note the Log Time comments field so I've created a Time Entry custom workflow on before saving:
if comments.present?
issue.notes = comments
end
This works if I enter time from edit link of an issue but it does nothing from Log Time link on same issue.
How can I make it work on both links?
Thanks
The text was updated successfully, but these errors were encountered: