-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Manage EOL date by checkbox of eol_explicit #13846
Manage EOL date by checkbox of eol_explicit #13846
Conversation
user take decision if want to set manually eol_date or leave it for calculation on the base model_eol
no sure if this function is still requried, as eol_explicit status is managed directly by user on asset form
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Robert,
Removing the logic in the asset observer means that at the very least the logic needs to be added to the API assets controller.
The other option would be to remove the logic completely, but then we'd still need to add eol_explicit
to the API asset controller, as well as get that added to the documentation.
Added also logic for API based on |
Hi spencerrlongg, do you think that we can ask for merge this PR? |
Hey @Robert-Azelis, I'm working on some changes to the asset store method right now and it's going to cause some conflicts. Hopefully that PR is in today, and then we'll be able to revisit this, sorry for the delay on all this. |
If you want to take a look at it I've got it drafted here: https://github.com/snipe/snipe-it/pull/13964/files Not quite done but I'll give you a ping when it is.
|
updated logic for change model of asset
updated manage eol_date when model is changed
updated manage eol_date when purchase date or model changed
updated manage eol_date when purchase date or model changed
updated |
Hi @spencerrlongg any news in this case? |
Hey @Robert-Azelis - meant to get back to you a while back but the holidays and stuff got in the way. I think I'm fine with the direction you were going, but unfortunately I ended up refactoring the I'm planning on applying those same changes to the other AssetsController soon, will probably start on that tomorrow. The BulkAssetsController has also undergone some changes. I'd be happy to have a look and provide any help if you want to give it another go, though it might be best to wait until I've got the |
Hi @spencerrlongg, I will update files to new code v6.3.0 (try this week), then we can review once again ;) |
Hi, @spencerrlongg |
Description
[ It's re-created PR #13806 as I made mistake and updated my branch by master, sorry for confusion ]
This improvement allow setup EOL date manually by user on damand by set eol_explicit checkbox.
BEFORE:
![image](https://private-user-images.githubusercontent.com/82208283/278740002-4c9221ce-78a8-4c53-9575-f30634e53eba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDUxMjgsIm5iZiI6MTczODk0NDgyOCwicGF0aCI6Ii84MjIwODI4My8yNzg3NDAwMDItNGM5MjIxY2UtNzhhOC00YzUzLTk1NzUtZjMwNjM0ZTUzZWJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE2MTM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkNGIyYTdlMTI2NTNkYWM2NGFlMTI1OWQwYTQ2ODgzYTY3OTliOWI3MWY1ZWY2MjlhM2FjZDAxNmNlZDJiMGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xCeSC8QQRc48T-ngBIWLP509JVrfQGRA--n4ZnoofN4)
AFTER:
![image](https://private-user-images.githubusercontent.com/82208283/280048043-e0140b06-b105-474a-950c-5cc9e551888a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDUxMjgsIm5iZiI6MTczODk0NDgyOCwicGF0aCI6Ii84MjIwODI4My8yODAwNDgwNDMtZTAxNDBiMDYtYjEwNS00NzRhLTk1MGMtNWNjOWU1NTE4ODhhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE2MTM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkODMxZDhiNjcyMDkzYTA1M2YyMjFlZWFmYjFiN2M0NWRhZWVlNjEyZTY2NjM2OTVlZjVjZjg5MTRkM2E4MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.m9A4xNQzF0GF-7-VIyxi-S3lUU3ZA4MB5S0xe9IxWME)
If checkbox is not checked then EOL date is hiden and calculation of date is on the base Model EOL rate
If checkbox is checked then EOL date is showed and user can input EOL Date manually.
![image](https://private-user-images.githubusercontent.com/82208283/279355223-468f9e12-5860-4052-b899-845b24e1d8d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDUxMjgsIm5iZiI6MTczODk0NDgyOCwicGF0aCI6Ii84MjIwODI4My8yNzkzNTUyMjMtNDY4ZjllMTItNTg2MC00MDUyLWI4OTktODQ1YjI0ZTFkOGQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE2MTM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4MTVkOWQ1YmE5NDA0YjhhM2YxMTc2NjcyNDU1ZWRkY2E4ODljZjE1NTE1NjA0NjY5YmUzM2Y3ODVjYzA5NmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eSrRBRVFgm4yNK4VYwWM-izY9tiGzve5PHwkwQ4OMpY)
Status of checkbox is saved as eol_explicit value
In this way is much easier to manage EOL date and explicit marker status instead of build complex rules :)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: