Content
View differences
Updated by Aleix Suau about 5 years ago
### **Environment**:
Your OpenProject Version: Cloud Edition
Operating System / Browser / OpenProject language: n/a
### **Logs**
### **Steps to reproduce:**
1\. Go to [https://community.openproject.com/projects/openproject/work\_packages/create\_new?type=6](https://community.openproject.com/projects/openproject/work_packages/create_new?type=6) (you should be in details view now)
2\. Change the workpackage type to Epic
3\. Add some text in the description
4\. Change to fullscreen view
Actual behavior: The fullscreen view is opened, the template of the Epic is kept, the type changes back to Feature and the information I added is lost.
OR:
1\. Go to workpackages list, click on +Create and choose Task (details view should be opened)
2\. Add "abc"
3\. Change type to Idea
4\. Add "def"
5\. Change to fullscreen view
Actual behavior: The fullscreen view is opened, the type changes back to Task, "abc" is kept and "def" is lost.
I guess this is connected to the fact that the URL does not change when I change the workpackage type.
### **Actual Behavior**
see [https://community.openproject.com/projects/openproject/work\_packages/35968/activity#activity-5](https://community.openproject.com/projects/openproject/work_packages/35968/activity#activity-5)
### **Expected Behavior**
I keep the entered data and can continue working. Or there's at least a warning that I'm about to loose my data asking me if I want to continue (like one of these already in use in other cases:)
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20311/content"></div></figure>
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20312/content"></div></figure>
### Development Notes
* Issue explanation:
* The wp type select doesn't update the route params (wp type) when it changes.
* When the user clicks on the 'maximize' form icon, the user is redirected to "/\[project\_id\]/work\_packages/new?type=\[wp\_type\]" and it keep the params from the original route ("/\[project\_id\]/work\_packages/create\_new?type=\[wp\_type\]") that are not updated.
* There, the WorkPackageCreateService.continueExistingEdit returns false because the wp type param is not equal to the wp type from the changeset.
* Alternatives:
* Register a HalResourceEditFieldHandler.\_onSubmitHandlers that would update the params when the wp type is changes.
* Impediment: \_onSubmitHandlers are not called if the this.form.editMode is true (which is the case because it is a new form).
Your OpenProject Version: Cloud Edition
Operating System / Browser / OpenProject language: n/a
### **Logs**
### **Steps to reproduce:**
1\. Go to [https://community.openproject.com/projects/openproject/work\_packages/create\_new?type=6](https://community.openproject.com/projects/openproject/work_packages/create_new?type=6) (you should be in details view now)
2\. Change the workpackage type to Epic
3\. Add some text in the description
4\. Change to fullscreen view
Actual behavior: The fullscreen view is opened, the template of the Epic is kept, the type changes back to Feature and the information I added is lost.
OR:
1\. Go to workpackages list, click on +Create and choose Task (details view should be opened)
2\. Add "abc"
3\. Change type to Idea
4\. Add "def"
5\. Change to fullscreen view
Actual behavior: The fullscreen view is opened, the type changes back to Task, "abc" is kept and "def" is lost.
I guess this is connected to the fact that the URL does not change when I change the workpackage type.
### **Actual Behavior**
see [https://community.openproject.com/projects/openproject/work\_packages/35968/activity#activity-5](https://community.openproject.com/projects/openproject/work_packages/35968/activity#activity-5)
### **Expected Behavior**
I keep the entered data and can continue working. Or there's at least a warning that I'm about to loose my data asking me if I want to continue (like one of these already in use in other cases:)
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20311/content"></div></figure>
<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20312/content"></div></figure>
### Development Notes
* Issue explanation:
* The wp type select doesn't update the route params (wp type) when it changes.
* When the user clicks on the 'maximize' form icon, the user is redirected to "/\[project\_id\]/work\_packages/new?type=\[wp\_type\]" and it keep the params from the original route ("/\[project\_id\]/work\_packages/create\_new?type=\[wp\_type\]") that are not updated.
* There, the WorkPackageCreateService.continueExistingEdit returns false because the wp type param is not equal to the wp type from the changeset.
* Alternatives:
* Register a HalResourceEditFieldHandler.\_onSubmitHandlers that would update the params when the wp type is changes.
* Impediment: \_onSubmitHandlers are not called if the this.form.editMode is true (which is the case because it is a new form).