Changeset 7763 for branches/3.15-stable


Ignore:
Timestamp:
Dec 17, 2019, 8:22:14 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2201: The "Dry run" selection is lost if "Re-configure job" functionality is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.15-stable/www/common/plugin/configure.jsp

    r7679 r7763  
    8080<%!
    8181List<?> getParameterValues(PluginParameter<?> pp, DbControl dc, javax.servlet.http.HttpServletRequest request,
    82   PluginConfigurationRequest pcRequest, ItemContext currentContext)
     82  PluginConfigurationRequest pcRequest, ItemContext currentContext, Job job)
    8383{
    8484  ParameterType<?> pType = pp.getParameterType();
     
    106106    Object charset = currentContext.getObject("last-file-charset");
    107107    if (charset != null) values = Collections.singletonList(charset);
     108  }
     109 
     110  // Special handling for "dryRun" parameter which is typically not stored as a job proerty
     111  if ((values == null || values.size() == 0) && Parameters.DRY_RUN_PARAMETER.equals(pp.getName()))
     112  {
     113    if (job != null && job.isDryRun())
     114    {
     115      values = Collections.singletonList(true);
     116    }
    108117  }
    109118 
     
    272281        json.put("enumeration", pType.isEnumeration() ? 1 : 0);
    273282        json.put("multiplicity", pType.getMultiplicity());
    274         List<?> values = getParameterValues(pp, dc, request, pcRequest, currentContext);
     283        List<?> values = getParameterValues(pp, dc, request, pcRequest, currentContext, job);
    275284        json.put("values", convertToJson(values, dc, pType, dateFormatter, dateTimeFormatter));
    276285      }
Note: See TracChangeset for help on using the changeset viewer.