vitiral / artifact

The open source design documentation tool for everybody
http://vitiral.github.io/artifact/docs/index.html
Other
559 stars 38 forks source link

user defined attributes / fields #107

Open einsweniger opened 7 years ago

einsweniger commented 7 years ago

I'd like to propose yet another feature =D

I want to be able to add other attributes to the artifacts, like proposed in REQ-0-risks: you'd add likelyhood, impact and product placement to a RSK artifact.

Proposal: Allow additional attribute types to be added via settings.toml. Allow specifying constraints for the attribute. Constraints might be:

Reasons:

Cons:

vitiral commented 7 years ago

Some thoughts:

[attrs.checked-int] type = "int" min = 0 max = 10 required = true

[attrs.optional-checked-str] type = "str" max = 10 # max refers to the length


- for querying, I think you would need to use something like [jsonpath](https://github.com/dchester/jsonpath). This would be through a flag in the cmdline and an option in the web-ui
- for web-ui probably would just display these below partof/parts. For `ls` command there would probably be an `--attrs` method where you could spell out the attributes to list.

Other reasons this would be nice:
- I would like to support plugins in the future. Some of these plugins would probably want to have custom attributes.
rubdos commented 7 years ago

Yet another reason this would be nice: if you ever decide that end-users can add custom top level artifacts (e.g. US for user story, which is one I'd like to have), users can fully customize them.

And an even better reason: you could now define your RSK attributes through a "default" set of attributes, instead of hard coding them. I think that would be very nice.

vitiral commented 7 years ago

Negative: adds complexity to the user that I think is rarely needed which might confuse people. Complexity is always something which should be avoided as much as possible.

For instance, user stories should just be part of the text in requirements. I don't see any benefit of creating a separate field for them. Actually I don't see any benefits outside of the RSK artifacts. Can anyone come up with other examples?

einsweniger commented 7 years ago

@vitiral Providing a way to specify attributes across all ART would make artifact way more powerful. But, as you, I fear the added complexity in code, usability and configuration will divert attention from the original goal of artifact (simple quality), which I'd rather not sacrifice.

As @rubdos, I have thought about (mis?)-using it for checking and enforcing attributes, to define structure on i.e. scenarios (or user-stories), stakeholders (needs, roles, goals, ...) and possibly other artifacts.

(kinda off-topic) My "solution" until now:

Downsides to this approach:

einsweniger commented 7 years ago

@vitiral I came up with another attribute outside of RSK: priority of a REQ to balance them against each other.

einsweniger commented 7 years ago

And another for requirements: type: [(non-)functional, performance, usability, constraint, ...]

vitiral commented 7 years ago

I've decided to go forward with this feature, soley for plugin support and ISO support. I like this because it doesn't increase the complexity of the "standard" product, but allows plugins or users to make things as complex as THEY want to.

vitiral commented 7 years ago

@einsweniger this would be a great issue for you to work on, if you were still interested!