ejira icon indicating copy to clipboard operation
ejira copied to clipboard

ejira-update-my-projects does not run all the way on first run until buffer is saved to file

Open chaorace opened this issue 4 years ago • 0 comments

I struggled with this issue a fair amount earlier today. I kept running jira-update-my-projects, but the generated buffer was always incomplete! As it turns out, the function was failing because global org id lookup uses whatever is saved to file, ignoring buffer contents. Since this was a first-time run, there were no such files and the function was failing silently as a result.

The workaround for this issue is to save the incomplete project buffer to file, then rerun jira-update-my-projects. Once the file actually exists, the issue stops occurring.

I believe the best fix for this would be to check if the file exists first. If the file does not exist, write the top level outline, with project IDs, to buffer and save, then proceed as usual.

chaorace avatar May 15 '20 20:05 chaorace