nyyManni / ejira

Emacs JIRA integration
GNU General Public License v3.0
256 stars 35 forks source link

support top-level org headers in the document #36

Closed LoganBarnett closed 3 years ago

LoganBarnett commented 3 years ago

Prior to this change, having org headers (such as title) would trip up the creation of a new ticket, and that new ticket would override the project heading. This meant the project couldn't be found in later calls and would eventually lead to a "Target not found", with the document left slightly corrupted.

The fix here is to attempt to hang new headings from ejira--new-heading off of a parent heading by jumping to that parent heading, and then doing forward-line as we normally would. In the case that a parent isn't provided, the project is used.

My organization's jira structure is relatively flat. I have tested these changes both with and without top level headings and the problem is resolved. I suggest testing against your own structure to ensure I didn't break anything - though I have no reason to believe it will be broken.

LoganBarnett commented 3 years ago

Not really relevant to this PR, but I'm getting a lot of mileage out of ejira. Thanks!!