Skip to content

Record edit#3

Open
bkbartk wants to merge 6 commits into
Bentipe:mainfrom
bkbartk:record-edit
Open

Record edit#3
bkbartk wants to merge 6 commits into
Bentipe:mainfrom
bkbartk:record-edit

Conversation

@bkbartk
Copy link
Copy Markdown

@bkbartk bkbartk commented May 15, 2026

add edit possibility
and link to item.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getWorkItemUrl and stores teamProject/collectionUri/currentProjectName from VSS.getWebContext() so the work-item ID in the report can render as a link.
  • Bumps vss-extension.json to 1.5.11 and vss-extension.dev.json to 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 originalKey storage (e.g., due to stale in-memory state or concurrent modification from another tab), entryToMove will be undefined. The code still proceeds: Object.assign({}, undefined, { hours, date, description }) produces an object containing only the three edited fields, dropping workItemId, userId, userName, parent/epic info, etc. That malformed entry is then written into the new month's storage. Please guard for entryToMove being 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.

Comment thread src/time-report.html Outdated
Comment thread src/time-entry.html Outdated
Comment thread src/time-report.css Outdated
Comment thread src/time-report.html
@bkbartk
Copy link
Copy Markdown
Author

bkbartk commented May 18, 2026

Thnx,

I have all issues addressed using Claud AI.
and resolved the conflicts

Please let me know what you think, or let Copilot have another scan.

@bkbartk
Copy link
Copy Markdown
Author

bkbartk commented May 21, 2026

@Bentipe can you please have a look at the fixes,
still there are a few things I would like to optimize.

@bkbartk
Copy link
Copy Markdown
Author

bkbartk commented May 22, 2026

issue to be fixed,
on light mode white icons disappear on a white background.

@bkbartk
Copy link
Copy Markdown
Author

bkbartk commented May 22, 2026

ok,
fixesd some scrolling and layout issues,

and added an add entry button, on the page,

maybe to much for one PR, but please have a look,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants