-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
[Roadmap] Implement proper revision system #5028
Comments
This will be a killer feature but there are a bunch of things to consider; especially how it factors into the API. |
What about returning the active data (I think we discussed that there should be a active/latest marked revision) for the current requests (an new rev parameter is obmitted) so it's downwards compatible. And if there is an rev parameter we search for the particular revision. Can this be implemented with an Mixin? Wouldn't that remove so much work for the future if we do it properly? |
Uhm I do not want to do feature creeping, but PLM like change managment features would be very useful in some small business use cases. |
I think after we focus on cleaning up a bunch of things this would be really great; although I would prefer to get #4826 across first. |
We were discussing how revision control is the biggest feature gap for our use in Inventree in a recent team meeting. I know the MES effort is the current goal from this post, but I was wondering what sort of effort is required for the revision re-write? Specifically, we'd love for the revisions to cover the three bullets in the OP and have the ability to create new revisions for any part that the revised part is "used in". That way any revision on a BOM could revise the actualy master part as well. I am sure I can convince my employer to donate funds/coffee to this effort, but it would be beneficial to have some numbers before asking for them to become a sponsor. |
@bberg115 automatically generating new revisions for assemblies would be a much tougher ask - how can we account for the particular requirements of any given company who might handle variants differently? I would like to come up with a core framework for defining revisions, etc, and then the plugin system could be used to write a plugin that does what you want, and even be tailored to your company's particular requirements. Otherwise the different options and edge cases would become unsustainable. That being said, this issue is still very important for me, and any funding towards its development would be very much appreciated. Additionally any insights into how people would use it or like to see it structured would be helpful too. |
@SchrodingersGat thanks for the follow up. Your comment makes sense, especially regarding the plugin feature. Having fundamental revision control tied to the tool would go a long way for our company as we're considering a paid variant instead due to the overhead of keeping revisions sync'ed between PDM/CAD and Inventree. What is your best guess is for the timeline of this request? Is there some metric or standard practice for donations/sponsors? I would love to bring this up with leadership but I do not have a good reference for the dollar amount or associated timeline. |
I will try to collect my fading memories on the topic which might be helpful defining the concept/goals. I have used two PLM (product lifecycle managment) systems in the past: Agile (from Oracle) and Arena (now part of PTC). They both shared similar concept on revisioning what I am trying to remember and describe below. Each revision is basically a capture of all aspects of the part: BoM, parameters and properties. The revisions had a status which could be:
The states above only make sense if further constrains are made on the Active and Superseded state:
The revision changes were implemented by change orders in each systems. When the change order was submitted a validation had been run on checking the BoM's of all affected items for non-active BoM items. |
When implementing inventree_approval I found it very useful to have a clear set of the imagined workflow in steps and conditions that might influence steps. Could you provide something like that @bberg115. Most of the company/industry-specific complexity like states, approvals, (change) orders and sync with external systems could be handled by plugins like @SchrodingersGat - especially if we hook into extendable surfaces like generic states (see #4289 - pretty sure this will land in 0.16.0), state transition hooks, metadata and events. A few challenges:
|
@bberg115 we/specific devs have gotten sponsorships for similar complex things in the past but I am not sure if the sponsoring company wants this info publicly available - please reach out to me (mail-in GH profile) and [email protected] to get a ballpark. |
@matmair that's a good point. Here's a very high level logic diagram of what the MVP plugin would do for us. This would only make sense if the "revision" was tracked like "batch code" by being tied to the actual stock. Our current work around consists of connecting date codes (via Batch Code Template) and an external database that can translate revisions of stock. I have sent you an email. Thanks for sharing that info. |
Ok I think that simple of a flow should be part of the core system and be reasonably simple to implement. Thank you for sharing that. I will wait a few days for a response from Oliver and Lukas but I can see a possible outline developing. |
To add some context here, as this has been a problem we have been considering for quite some time: Revisions as PartsI think the most sensible way to handle creation of "revisions" is to add a new field Revision Field (Existing)Each Part has an existing revision field - this is just decorative and has no functional business logic behind it currently. When we move to a proper relational revision system, we can either keep this field (and use it to denote the "name" of the revision) or we remove it and use some other mechansim. I would vote to keep it, but then we have the issue of how we migrate existing systems where users have already filled in this revision field. Do we (can we) automatically create a new "revision" for each part that has a revision field specified? Or do we require the users manage this manually (somehow)? Part LockingI would suggest we add in a new part attribute BOM ProtectionsCurrently, BOM items can be created, edited or deleted without any particular protecitons. I would suggest that we add in (at least) the following:
Any other suggested protections here? Revision RestrictionsThe following restrictions would be in place (feel free to suggest others):
I will continue to ponder on this and would appreciate feedback on the ideas above. It is important that we get this right! |
I like the idea from @SchrodingersGat of how part revisions should work, (although I currently have not a real need for it, its more a nice to have feature for me).
|
I would also suggest that on the part detail page, if the part has "revisions" there is a dropdown menu (with the displayed revision selected) - the user can open that and select a different revision to display. We can use the existing "active" part flag to show which revisions are in use, but how do we determine which is the "most up to date" revision? Just using the "revision" attribute field? Note that some companies may want to have multiple active revisions at any one time. |
Maybe we can assume all active parts are the used/latest revisions, and highlight the inactive in light grey. And just an idea, not sure how much switching between variants is necessary, but maybe we could also show a revision drop down selector right to the breadcrumb to easily switch between revisions. |
A selector to the right of the breadcrumbs seems like a clean implementation to me. |
Regarding "change management" - I would like to push this off to a plugin entirely. Maybe we offer a "first class" plugin, but we should not enforce approvals, etc, at this level. |
I think both @SchrodingersGat and @wolflu05 have valid points with respect to locking. The thought of it being a plugin is nice, but I am not familiar how a plugin would stop someone from making changes if the plugin enforces approvals. With respect to this reply - #5028 (comment) Revision Field (Existing)
Part Locking BOM Protections
Nothing else comes to mind - it may be nice to not be able to "deactivate" a part with the same logic. Revision Restrictions
I think a majority of these topics may be best as boolean options from settings. I can picture users having different preferences for locking, protections, and restrictions. This could be a future solution, as I am sure it adds scope. Maybe the original effort would turn them all on or off? |
Additional information from @matmair 's reply -
Examples:
I could see this going either way, but I do think it may be be best as a plugin. I think the MVP of this effort is some sort of background worker that identifies differences (revision mismatch, missing parts, etc) between the two systems. It would be nice if the PDM could link to the part file in inventree to push any changes - even if it is a manual process. Even something as simple as a plugin that highlights changes in the previous 24 hours (possibly a report?).
This is always a difficult internal discussion - we end up using PDM as source of truth because it's a controlled source (you can lock out files from being edited and require review to "revise"). However, I think we would lean on Inventree if this could be done in the tool itself as a majority of our team interacts with inventree and only a view have access to PDM (due to cost/training).
I think it would be nice, but not required anytime soon. Personally, I think there is value in users comparing the two databases for mismatch as there's a lot of stuff to review and not just a straight forward comparison. In addition, our PDM only covers mechanical stuff and we have to identify a solution for our other platforms - software and PCBAs.
I think it should be considered as a way shaping future versions on inventree, but I assume it will be best to be seperate them as there are so many flavors of PDM/PLM. |
I think we have the requirements on the table - maybe it would be best to now create an epic with a short outline of the target function, python/REST APIs and a tasklists for the required changes. BackendTo keep this generic I would suggest adding 2 models:
The business logic for parts would need the adoption mentioned above by @SchrodingersGat - maybe we could also call state transitions when deleting / deactivating parts to make that also available to plugins. REST API changes:
FrontendI like the idea of a dropdown in the breadcrumbs, maybe we can also add an admotion or alert if an old revision is viewed. |
@bberg115 thank you for your inputs - I think we should split out PDM integration into it's own issue as there is only loose (business logic) coupling in this area. Do you agree? |
@matmair I think this is tricky. I'd suggest that "unique" is IPN+Revision. An example would be for part 10005 - you can have 10005 (original part, per Oliver's reply above), 10005-01 (first revision), 10005-02 (2nd revision), etc.. Therefore, Inventree would see 3+ unique IPNs and allow for new revisions without allowing for duplicate revisions.
Agreed. They both effect each other but do not need to be tied together. |
I would like add one important thing to the frontend wishlist: revision diffing tool to being able to quickly see what BoM items/parameters/properties had been changed. |
I'd like to add some thoughts to this as i'm implementing Inventree at my current company and am looking for ways to document changes in the interim before there is an "automated" way to do it within Inventree. Every company i've worked for over the last 25 years has had the concept of a major and a minor change. When it comes to assemblies, what does that mean?
So if you have the following assembly, where Major revisions are letters and Minor revisions are numbers:
If you make a minor change to 22-00002-003 to raise it to A1, the new BOM becomes:
And if you made a major change to 22-00002-003 to raise it to B0, the new BOM would become:
There would be no recursion higher than this, otherwise you'd be revising every level of your BOM every time any part on any level of the BOM were updated. As an MVP system, i'm looking at using the ability to duplicate a part to approximate a revision control system that could retain some of the history of the overall BOM. I'm not quite to a complete solution, but this might give some ideas how to approach a more integrated solution. The plan:
Using the part tree from above as an example: For a MINOR revision of a part (eg. 22-00002-003 Rev A0)
For a MAJOR revision of a part (eg. 22-00002-003 Rev A0)
This could be done fairly easily manually, but it would be nice if it could eventually be automated in some way. I've worked through it a few times and I don't think there's anything amiss... Old BOM's end up marked inactive, but still available to view if you need/want to. No, there's no "control" on this, so even though the parts are inactive, they can still be edited, unless there's a permission somewhere that would prevent that for most users. I've been looking at this for a week now and this is the first time i've written it all out as a process so apologies in advance if i've overlooked something fundamental or if it's not clear... Happy to add more detail or work on a flowchart to show it more clearly at some point. :) |
I came across this discussion and just as a referece regarding the IPN uniqueness I described my usecase last year in issue #4618. To summarize, I want to validate that each new base part is assigned with a unique IPN. If a part has multiple revisions the same IPN should be used for all revisions of the same base part. As this validation scheme is not supported by the current core code I have done such validation with a plugin since last year. It is also worth to mention that the assigned serial numbers are unique for each base part irrespective of revisions which is good. So my suggestion for the question from @matmair
is to allow parts with revisions to share IPN, but still it should be possible to validate that the IPN is unique for the base part |
@gunstr that could be implemented as a custom validation plugin, but it does sound like it would be useful as a first class feature, perhaps behind a configurable setting. |
@motusRP I think you have a great summary, sorry for my delayed response. I think the only thing I would add is that major/minor revision "list" should be customisable as we all have different means noting major/minor revisions. |
Currently the "revision" field is a simple text field, does not have any functional meaning.
Future development should focus on implementing proper "revision" for Part:
Tasks
Upvote & Fund
The text was updated successfully, but these errors were encountered: