Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The alterable indicator is now copied when cloning a task. #1553

Merged
merged 5 commits into from
Jun 11, 2021

Conversation

jhelmold
Copy link
Member

@jhelmold jhelmold commented Jun 9, 2021

The alterable indicator is now copied when cloning a task.

What:
in gmp.c:
Introduced the new value "-1" for the parameter "alterable"
at the function call of "copy_task()" in function
"gmp_xml_handle_end_element()".

in manage_sql.c, function "copy_task()":
Extended the call of the function "copy_resource_lock ()",
so that also the column "alterable" is copied. The column
"alterable" of the table "tasks" is now only updated if
the parameter "alterable" is >= 0.

Why:
This fixes a bug.

How did you test it:
Checked the cloning of audits and tasks in GSA.

Checklist:

in gmp.c:
  Introduced the new value "-1" for the parameter "alterable"
  at the function call of "copy_task()" in function
  "gmp_xml_handle_end_element()".

in manage_sql.c, function "copy_task()":
  Extended the call of the function "copy_resource_lock ()",
  so that also the column "alterable" is copied. The column
  "alterable" of the table "tasks" is now only updated if
  the parameter "alterable" is >= 0.
@jhelmold jhelmold marked this pull request as ready for review June 9, 2021 09:21
@jhelmold jhelmold requested a review from a team as a code owner June 9, 2021 09:21
@jhelmold jhelmold removed the request for review from a team June 10, 2021 06:42
@timopollmeier timopollmeier added backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch labels Jun 10, 2021
Copy link
Member

@timopollmeier timopollmeier left a comment

Choose a reason for hiding this comment

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

It would be nice if you could add the meaning of the -1 value for the alterable parameter to the function documentation.
Also, please add the backport labels to PRs that are meant to be backported.

Adjusted the comment for the parameter "alterable" at
the function header of copy_task() in manage_sql.c.
@timopollmeier timopollmeier merged commit 2bfc487 into greenbone:master Jun 11, 2021
@timopollmeier
Copy link
Member

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Jun 22, 2021

Command refresh: success

Pull request refreshed

@timopollmeier
Copy link
Member

@Mergifyio backport gvmd-21.04

@timopollmeier
Copy link
Member

@Mergifyio backport gvmd-20.08

@mergify
Copy link
Contributor

mergify bot commented Jun 22, 2021

Command backport gvmd-21.04: success

Backports have been created

  • Backport to branch gvmd-21.04 not needed, change already in branch gvmd-21.04

@mergify
Copy link
Contributor

mergify bot commented Jun 22, 2021

Command backport gvmd-20.08: success

Backports have been created

  • Backport to branch gvmd-20.08 not needed, change already in branch gvmd-20.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants