Feature #8147
closedAdd support for preset unsafe and safe marks
100%
Description
Marks are extremely valuable for testing and validation. So we need Bridge to support preset unsafe/safe marks.
Updated by Evgeny Novikov over 7 years ago
- Priority changed from Urgent to Immediate
Increase the issue priority since it blocks the high priority issue.
Updated by Evgeny Novikov over 7 years ago
- Priority changed from Immediate to Urgent
This was the only immediate feature request. Let's use immediate just for crucial bugs.
Updated by Vladimir Gratinskiy over 7 years ago
- Due date set to 05/03/2017
- Status changed from New to Resolved
- % Done changed from 0 to 100
Implemented in feature_8147.
Updated by Evgeny Novikov over 7 years ago
- Status changed from Resolved to Open
I met the following exception when I tried to edit an existing unsafe mark:
Error while saving/creating mark: get() returned more than one MarkUnsafeHistory -- it returned 21! Traceback (most recent call last): File "/home/novikov/work/klever/bridge/marks/views.py", line 225, in save_mark res = mutils.NewMark(request.user, savedata) File "/home/novikov/work/klever/bridge/marks/utils.py", line 149, in __init__ self.mark = self.__new_mark() File "/home/novikov/work/klever/bridge/marks/utils.py", line 195, in __new_mark mark = res.change_mark(self._inst) File "/home/novikov/work/klever/bridge/marks/UnsafeUtils.py", line 131, in change_mark last_v = MarkUnsafeHistory.objects.get(version=F('mark__version')) File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/query.py", line 383, in get (self.model._meta.object_name, num) marks.models.MultipleObjectsReturned: get() returned more than one MarkUnsafeHistory -- it returned 21!
Updated by Evgeny Novikov over 7 years ago
Also I suggest to specify error trace patterns within unsafe marks themselves rather than within dedicated files since they won't be likely reused and they are quite compact.
Updated by Vladimir Gratinskiy over 7 years ago
- Status changed from Open to Resolved
Evgeny Novikov wrote:
Also I suggest to specify error trace patterns within unsafe marks themselves rather than within dedicated files since they won't be likely reused and they are quite compact.
Done. Also the exception was fixed.
Updated by Evgeny Novikov over 7 years ago
- Status changed from Resolved to Open
When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".
Updated by Vladimir Gratinskiy over 7 years ago
Evgeny Novikov wrote:
When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".
Let's add statuses "Edited just tags preset", "Edited just description preset", "Edited tags and status preset", "Edited tags created", "Edited tags, but revert changes uploaded" then? Why not?
Updated by Evgeny Novikov over 7 years ago
- Status changed from Open to Resolved
Vladimir Gratinskiy wrote:
Evgeny Novikov wrote:
When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".
Let's add statuses "Edited just tags preset", "Edited just description preset", "Edited tags and status preset", "Edited tags created", "Edited tags, but revert changes uploaded" then? Why not?
Okay, let's think about such aspects of preset entities comprehensively next time. Indeed they are almost unused now (just created once during an initial population) like marks before, so there are much more questions that weren't asked yet. When we will use them more, we will encounter a lot of various problems.
Updated by Evgeny Novikov over 7 years ago
- Status changed from Resolved to Closed
I merged the branch to master in 679f7706. Don't forget to migrate databases!
Now a way to keep not only validation and test tasks but also corresponding marks is open.