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

[Save form] Re-saving of draft creates new draft instead of updating exis… #1400

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

girotraapankaj
Copy link
Collaborator

…ting draft

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.27%. Comparing base (e1a2739) to head (ec1a6a0).

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #1400      +/-   ##
============================================
+ Coverage     82.24%   82.27%   +0.03%     
- Complexity      902      905       +3     
============================================
  Files           103      103              
  Lines          2337     2341       +4     
  Branches        317      319       +2     
============================================
+ Hits           1922     1926       +4     
  Misses          254      254              
  Partials        161      161              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@girotraapankaj girotraapankaj changed the title [Draft] Re-saving of draft creates new draft instead of updating exis… [Save form] Re-saving of draft creates new draft instead of updating exis… Sep 16, 2024
if (request != null && StringUtils.isNotBlank(request.getParameter(GuideConstants.AF_DATA_REF))) {
final String dataRef = request.getParameter(GuideConstants.AF_DATA_REF);
if (dataRef.startsWith(DRAFT_PREFILL_SERVICE)) {
properties.put(GuideConstants.DRAFT_ID, StringUtils.substringAfter(dataRef, DRAFT_PREFILL_SERVICE));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this property does not get stored on jcr, it will be added when FP prefill is used.

@devgurjar
Copy link
Contributor

LGTM

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