Record edit#3
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the ability to edit existing time entries (in addition to delete) from both the time-entry side panel and the time-report view, and makes the work-item ID in the report a clickable link back to the Azure DevOps work item. Both manifest versions are bumped.
Changes:
- Replaces the text "Delete" button with icon-based Edit/Delete buttons and introduces a modal dialog (HTML + CSS) for editing hours, date, and description, including cross-month moves between storage keys.
- Adds
getWorkItemUrland storesteamProject/collectionUri/currentProjectNamefromVSS.getWebContext()so the work-item ID in the report can render as a link. - Bumps
vss-extension.jsonto 1.5.11 andvss-extension.dev.jsonto 1.4.28.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vss-extension.json | Version bump to 1.5.11. |
| vss-extension.dev.json | Dev version bump to 1.4.28. |
| src/time-entry.html | Adds Edit modal, replaces delete button with icon buttons, adds edit save logic with cross-month move, and stores teamProject on new entries. |
| src/time-entry.css | New .icon-btn, modal backdrop/content styles; removes old .delete-btn styles; adds !important to label color. |
| src/time-report.html | Captures currentUser/collection/project context, adds actions column with edit/delete icons, edit modal logic, and renders work-item ID as a link via getWorkItemUrl. |
| src/time-report.css | New icon-button, actions cell, global anchor, and edit-modal styles. |
Comments suppressed due to low confidence (1)
src/time-report.html:1209
- If the entry cannot be found in
originalKeystorage (e.g., due to stale in-memory state or concurrent modification from another tab),entryToMovewill beundefined. The code still proceeds:Object.assign({}, undefined, { hours, date, description })produces an object containing only the three edited fields, droppingworkItemId,userId,userName, parent/epic info, etc. That malformed entry is then written into the new month's storage. Please guard forentryToMovebeing undefined and abort the move (with an error message) before the second write.
var entryToMove = null;
window.dataService.getValue(originalKey, { scopeType: "Default" }).then(function(data) {
var oldEntries = data || [];
entryToMove = oldEntries.find(function(e) { return e.id === editingEntryId; });
return window.dataService.setValue(originalKey, oldEntries.filter(function(e) { return e.id !== editingEntryId; }), { scopeType: "Default" });
}).then(function() {
return window.dataService.getValue(newKey, { scopeType: "Default" });
}).then(function(data) {
var updatedEntry = Object.assign({}, entryToMove, { hours: hours, date: date, description: description });
return window.dataService.setValue(newKey, (data || []).concat([updatedEntry]), { scopeType: "Default" });
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thnx, I have all issues addressed using Claud AI. Please let me know what you think, or let Copilot have another scan. |
|
@Bentipe can you please have a look at the fixes, |
|
issue to be fixed, |
|
ok, and added an add entry button, on the page, maybe to much for one PR, but please have a look, |
add edit possibility
and link to item.