openwisp / openwisp/openwisp-controller

[fix] Recent Commands row uses "created" timestamp for the "Modified" field

Open Beginner friendly
#1,263 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
773
Forks
315
Avg merge
2d 16h
Merged PRs (30d)
14

Description

Issue

In commands.js, the getElement function builds the HTML for a new
command row inserted into "Recent Commands" after a command is submitted.
The Modified field incorrectly uses response.created instead of
response.modified:

openwisp_controller/connection/static/connection/js/commands.js ~line 506-510

<div class="form-row field-modified">
    <div><label>Modified:</label><div class="readonly">${getFormattedDateTimeString(
      response.created,   // bug: should be response.modified
    )}</div></div>
</div>

Screenshots :

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open openwisp_controller/connection/static/connection/js/commands.js and inspect getElement around lines 506-510, focusing on how the Recent Commands row formats response.created and response.modified. Update the Modified field so it displays the modified timestamp, then verify that a newly submitted command shows the correct value in Recent Commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.