ascii-dresden / asciii

ascii invoicer 3.x
http://ascii-dresden.github.io/asciii/
5 stars 8 forks source link

storage: match by index in project list #92

Closed Lodifice closed 4 years ago

hoodie commented 4 years ago

thanks, could you prefix the commit message with feat: please? for the changelog

hoodie commented 4 years ago

this feature is cool, already had that in the old ruby version. though its a bit hard to document. what about making it a flag like in asciii ls -n 13 instead of asciii ls N13?

Lodifice commented 4 years ago

Problem with the first commit: the list commands sort the projects in a specific way which can be changed by config or command line. When we search for matching projects in the edit command, there is no guarantee that the projects are traversed in the same order as that of the last list command, so indices may be off.

The second commit circumvents this by sorting projects in the default order. If this is too inefficient, you may reject this one.

Lodifice commented 4 years ago

this feature is cool, already had that in the old ruby version. though its a bit hard to document. what about making it a flag like in asciii ls -n 13 instead of asciii ls N13?

I defninitely agree with you, but I just fulfilled the wish of the current board ;)

hoodie commented 4 years ago

I'm playing my product-owner card here and veto to make it a flag -n

btw: you know you can use the "Rechnungsnummeras well: e.g. just sayascii edit R013 also: it will fuzzy search e.g.asciii edit output`

the rest seems is ok, the variable name projexts could be replaced by something more meaningful, I think in this case shadowing the projects name is ok since you're replacing it

Lodifice commented 4 years ago

I'm playing my product-owner card here and veto to make it a flag -n

Ok, then please discuss this with the board ;)

btw: you know you can use the "Rechnungsnummeras well: e.g. just sayascii edit R013also: it will fuzzy search e.g.asciii edit output`

Yes, but the use case were projects that don't have a Rechnungsnummer yet.

the rest seems is ok, the variable name projexts could be replaced by something more meaningful, I think in this case shadowing the projects name is ok since you're replacing it

I can't believe I actually pushed that :see_no_evil: